Checkout Page API
A predictable REST API over HTTPS. JSON in, JSON out, conventional status codes, and a typed SDK for TypeScript.
Authentication
Send your secret key as a bearer token on every request. Keys are scoped per environment — test keys never touch live money.
Endpoints
Every endpoint returns JSON and uses conventional HTTP status codes. IDs are prefixed by resource type, so they are safe to log.
/checkoutsCreate a checkout session and get a hosted URL back./checkouts/:idRetrieve a checkout session and its current status./ordersList orders, filtered by product, status or date range./orders/:idRetrieve one order with line items and custom field answers./orders/:id/refundsRefund an order in full or in part./subscriptionsList subscriptions with plan, status and next charge date./subscriptions/:id/pausePause billing without cancelling the subscription./subscriptions/:idCancel immediately or at the end of the period./webhooksRegister an endpoint and choose the events it receives./webhooks/:id/deliveriesInspect delivery attempts and replay any of them.Webhook events
Deliveries are signed with HMAC-SHA256 and retried with exponential backoff for 24 hours. Handlers should be idempotent.
order.completedA payment succeeded and the order is fulfilled.
order.refundedA full or partial refund was issued.
checkout.abandonedA buyer left before paying, after entering an email.
subscription.createdA new subscription started, including trials.
subscription.updatedPlan, quantity or billing date changed.
subscription.pausedBilling was paused by the customer or by you.
subscription.cancelledThe subscription ended or was cancelled.
payment.failedA recurring charge failed and entered retry.
Errors
| 400 | invalid_request | A parameter is missing or malformed. The response names the field. |
| 401 | unauthorised | The API key is missing, revoked or from the wrong environment. |
| 403 | forbidden | The key is valid but the plan does not include this endpoint. |
| 404 | not_found | No resource with that ID exists on this account. |
| 409 | conflict | The request collided with the current state, e.g. double refund. |
| 429 | rate_limited | Too many requests. Back off using the Retry-After header. |
| 500 | server_error | Something broke on our side. These are alerted on and investigated. |
Rate limits
Build it this afternoon
Test-mode keys are available the moment you sign up. No sales call, no waiting list.