API Reference
Checkout and webhook endpoints, authentication, responses, and status codes.
Hosted Checkout uses the production base URL below. Send and receive JSON unless an endpoint says otherwise.
#Base URL
https://app.rantan.xyz/api/v2#Authentication
Session creation, detail, cancellation, and all webhook management APIs require the product owner’s seller JWT. Public Checkout data is session-scoped. Verification requires either the owner JWT or the session verification key.
| Credential | Header | Use |
|---|---|---|
| Seller JWT | Authorization: Bearer {token} | Create, detail, cancel, webhook management, or owner verification |
| Verification key | X-Rantan-Checkout-Verification-Key: {key} | Merchant backend fulfillment verification |
#Checkout and webhook endpoints
/api/v2/checkout-sessions/Create a server-bound Checkout Session.
/api/v2/checkout-sessions/{sessionId}/checkout/Read public product and session data used by hosted Checkout.
/api/v2/checkout-sessions/{sessionId}/Read a session as the authenticated product owner.
/api/v2/checkout-sessions/{sessionId}/Cancel an open session as the product owner.
/api/v2/checkout-sessions/{sessionId}/verify/Verify fulfillment with the seller JWT or verification key.
/api/v2/webhooks/endpoints/Create a webhook endpoint and receive the signing secret once.
/api/v2/webhooks/endpoints/List webhook endpoints owned by the seller.
/api/v2/webhooks/endpoints/{endpointId}/Read one webhook endpoint configuration.
/api/v2/webhooks/endpoints/{endpointId}/Update a webhook endpoint configuration.
/api/v2/webhooks/endpoints/{endpointId}/Disable a webhook endpoint.
/api/v2/webhooks/endpoints/{endpointId}/rotate-secret/Rotate the signing secret and receive the replacement once.
/api/v2/webhooks/deliveries/List up to 100 recent webhook deliveries.
/api/v2/webhooks/deliveries/{deliveryId}/retry/Replay a delivery with the same event id.
#HTTP status codes
| Status | Meaning |
|---|---|
200 | Existing idempotent session, successful read, verification, or cancellation. |
201 | A new Checkout Session was created. |
400 | Request fields or product-specific options are invalid. |
401 | Seller authentication is missing or invalid. |
403 | The verification key or authenticated owner does not match the session. |
404 | The product or Checkout Session does not exist for this caller. |
409 | Order reference conflict, unsupported product state, or processing already started. |
410 | The Checkout Session was canceled or expired before a purchase started. |