Documentation Index
Fetch the complete documentation index at: https://docs.getopenrails.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/gateway/sessions
Creates a checkout session and returns acheckoutUrl to redirect the buyer to.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
product | string | Yes | Product or plan name shown on the checkout page. |
amount | number | Yes | Amount in USD. Must be greater than 0. |
customer | string | Yes | Buyer email address. Used to look up or create a customer record. |
preferredRoute | string | No | Preferred route kind: card, wallet, or local. |
redirectUrl | string | No | URL to redirect the buyer to after checkout completes or fails. |
metadata | object | No | Up to 10 key-value string pairs attached to the session. |
idempotencyKey | string | No | Stable key for deduplication. Recommended for order-backed checkouts. |
clientReferenceId | string | No | Your internal order or reference ID. |
environment | string | No | sandbox or production. Defaults to sandbox. |
Response
Fulfillment rule
Only fulfill orders after receiving apayment.paid webhook event. Do not fulfill on session creation or on payment.provider_pending. See Webhooks for the full event contract.
Status values
| Status | Meaning |
|---|---|
routed | Session created and buyer can be redirected to checkoutUrl. |
pending | Buyer has started checkout; payment is in progress. |
paid | Payment confirmed. Safe to fulfill. |
failed | Payment failed or timed out. |
expired | Session expired before the buyer completed checkout. |