Live Checkout

Real-time “Payment received” via a session token + SSE stream.

Show a payer real-time status. Create a session token for an account, then stream its reconciliation status over Server-Sent Events — the status flips to paid the instant the deposit reconciles.

The stream + snapshot are anonymous

They're authorised by the opaque token, not your API key, so they're safe to hit directly from a payer's browser. They expose only payment state — never PII.

Tokens expire

Default TTL is 1 hour (max 24h via ttlSeconds). An unknown or expired token returns 404 — mint a fresh session per checkout.

Use EventSource

new EventSource(streamUrl) reconnects automatically. Close it on unmount, and fall back to the snapshot endpoint where SSE isn't available.
post/api/v1/checkout/sessions

Create a checkout session for one of your virtual accounts (API plane).

Mints an opaque, expiring token scoped to one account. Hand the returned streamUrl/snapshotUrl to your payer-facing page.

Requires Bearer token

Body parameters

accountRefstringoptional
ttlSecondsintegeroptional

Responses

201Created
POST /api/v1/checkout/sessions
curl -X POST "https://api.xental.online/api/v1/checkout/sessions" \
  -H "Authorization: Bearer <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "accountRef": "inv_001"
  }'
Example request body
{
  "accountRef": "inv_001"
}
get/api/v1/checkout/{token}

Current payment state for a checkout token (anonymous). 404 if unknown/expired.

Public

Path parameters

tokenstringrequired

Responses

200OK404Not Found
GET /api/v1/checkout/{token}
curl -X GET "https://api.xental.online/api/v1/checkout/:token"
get/checkout/{token}

Current payment state for a checkout token (anonymous). 404 if unknown/expired.

Public

Path parameters

tokenstringrequired

Responses

200OK404Not Found
GET /checkout/{token}
curl -X GET "https://api.xental.online/checkout/:token"
get/api/v1/checkout/{token}/stream

Server-Sent Events stream of reconciliation status for a checkout token (anonymous). Emits the current snapshot immediately, then a `data:` event on every status change.

An SSE stream — connect with EventSource. Emits the current snapshot immediately, then a new event on every status change.

Public

Path parameters

tokenstringrequired

Responses

200OK
GET /api/v1/checkout/{token}/stream
curl -X GET "https://api.xental.online/api/v1/checkout/:token/stream"