The CheckoutSession object
Represents a checkout session for payment processing. Checkout sessions are created to initiate a payment flow and can be used for hosted checkout pages or embedded payment experiences.
Fields
| Field | Type | Description |
|---|---|---|
id REQUIRED | string | Unique identifier for the checkout session |
merchantId REQUIRED | string | ID of the merchant who created the session |
playerId REQUIRED | string | ID of the player/user making the payment |
amount REQUIRED | number | Payment amount in the source currency |
targetSettlementAsset REQUIRED | string | Target cryptocurrency for settlement (e.g., 'USDC') |
status REQUIRED | 'created'| 'active'| 'completed'| 'cancelled'| 'expired' | Current status of the checkout session |
paymentIntentId OPTIONAL | string | Associated payment intent ID (if payment initiated) |
rampOrderId OPTIONAL | string | Associated ramp order ID (if on-ramp initiated) |
successUrl OPTIONAL | string | URL to redirect on successful payment |
cancelUrl OPTIONAL | string | URL to redirect on cancelled payment |
paymentPageUrl OPTIONAL | string | URL to the hosted payment page |
expiresAt OPTIONAL | string | ISO 8601 timestamp when the session expires |
createdAt REQUIRED | string | ISO 8601 timestamp when the session was created |
updatedAt REQUIRED | string | ISO 8601 timestamp when the session was last updated |
Example
{
"id": "obj_1a2b3c",
"merchantId": "merchant_1a2b3c",
"playerId": "player_1a2b3c",
"amount": 5000,
"targetSettlementAsset": "string",
"status": "created",
"paymentIntentId": "paymentintent_1a2b3c",
"rampOrderId": "ramporder_1a2b3c",
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-01-15T09:30:00Z"
}
Usage
const session = await client.checkout.create({
playerId: 'player_123',
amount: 100,
targetSettlementAsset: 'USDC',
successUrl: 'https://myapp.com/success'
});
// Redirect user to session.paymentPageUrl