Skip to main content
Create a checkout session that locks product version, pricing, and currency. This is the first step in the checkout flow for both one-time and subscription products. The typical flow is:
  1. Merchant creates a checkout session (server-side)
  2. Returns checkoutUrl to the frontend
  3. Customer clicks the link and lands on the hosted checkout page
  4. Customer fills in billing details, previews tax, and completes the order
Authentication: API Key or Store Slug

Request Body (API Key)

Request Body (Store Slug)

Store Slug authentication does not support priceSnapshot, expiresInSeconds, metadata, orderMerchantExternalId, withTrial, includePaymentMethods, or excludePaymentMethods. These fields are silently ignored to prevent price tampering and session manipulation from the client side. Payment method selection is a merchant-side commercial decision (channel fees, settlement terms), so a browser cannot narrow or widen it — Store Slug sessions always offer everything the currency supports.
ID-naming convention: the same flat dual-key names (orderMerchantExternalId on checkout-side, refundTicketMerchantExternalId on refund-ticket-side) are used across request bodies, webhook payloads, and every GraphQL type that carries the value — so a value written at checkout can be read back from Order, Payment, Refund, or a webhook payload under the same field name.

Price Snapshot Object

Billing Detail Object

Passing billingDetail couples the cashier to the order’s billing country: it then offers only that country’s payment market, and the buyer cannot switch markets. The country that applies is the one on the finished order, not the one you sent. A billing country outside the payment markets we cover applies no restriction.Check this against the payment methods your store allows before you enable it — if the coupled market offers none of them, the order cannot be paid. Omit billingDetail to leave the cashier unrestricted; that is the default.

Session Locks

When a checkout session is created, the following values are locked and cannot change during the session lifetime: productVersionId, productName, priceInfo, storeName, billingPeriod, withTrial, theme, buyerEmail, billingDetail Email normalization: All email fields (email, buyerEmail, contactEmail) are normalized server-side via trim().toLowerCase() before storage, cache writes, and downstream calls. Foo@Bar.COM and foo@bar.com are treated as the same account.

Example Request

Success Response (200)

Response Fields

Errors

Retry policy: Never retry 4xx — fix the request and resubmit. Retry 5xx with exponential backoff (start 5s, max 3 attempts).
payin_enable and prod_enabled are two independent conditions: payin_enable is a platform-controlled switch on payment acceptance, prod_enabled is the production-approval (KYB) gate. Either one alone yields a 403 in the prod environment. Neither applies in the test environment.
The default session TTL is 45 minutes (2700 seconds). When using API Key auth, you can customize this with expiresInSeconds. Sessions lock the product version and pricing at creation time, so price changes will not affect existing sessions.