Skip to Content
RunePayDocs

API reference

Conventions shared by every endpoint, and the generated reference for each one.

The endpoint pages in this section are generated from RunePay's OpenAPI 3.1 spec, /openapi/runepay-v1.json, which is generated from the same schemas that validate requests. If a page and the API disagree, that is a bug.

Base URL and authentication

POST https://runepay.co/api/v1/checkout_sessions
Authorization: Bearer sk_test_...
Content-Type: application/json

Send a secret key as a bearer token (Keys and security). The API is server to server: it sends no CORS headers.

Requests

  • Request bodies are JSON objects, at most 256 KB.
  • POST creates objects and runs actions; GET reads and lists. Updating a webhook endpoint uses PATCH today; payment links update with POST.
  • Unknown body parameters are rejected (parameter_unknown), so a typo fails instead of being ignored.
  • Every POST, PATCH and DELETE accepts an Idempotency-Key header. See Idempotency.

Responses

  • Objects have an id with a type prefix (cs_, pay_, re_, dp_, plink_, evt_, we_), livemode, and a created time.
  • Times are unix timestamps in seconds.
  • Money is an integer in the currency's smallest unit (1999 is $19.99) with a three-letter currency, uppercase in responses and any case in requests. USD is the currency enabled today.
  • metadata is a set of string keys and string values you attach and get back. Today, non-string values are dropped.
  • Every response, errors included, has a Request-Id header (req_…) and Cache-Control: no-store.
  • Errors share one shape. See Errors.
  • Lists are paged. See Pagination.

Resources

ResourceWhat it is
Checkout sessionsA hosted checkout page for one payment. The main way to take payments.
PaymentsCard payments, created by checkout.
RefundsMoney returned to the buyer for a payment.
DisputesChargebacks and inquiries raised by the buyer's bank.
Payment linksReusable checkout URLs you can share.
BalanceFunds RunePay holds for you, by state.
PayoutsTransfers of your available balance to your bank or wallet.
EventsThings that happened in your account; the same objects webhooks deliver.
Webhook endpointsURLs RunePay sends signed events to.

Webhook payloads are listed in the event reference.