How It Works
- Your server calls this endpoint with API Key authentication
- You receive a short-lived session token
- Pass the token to the customer’s browser
- The customer uses the token (
Authorization: Bearer <token>) to create orders and interact with checkout
Request Body
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).
Two pitfalls worth knowing
Do not reuse one idempotency key to mint tokens. Sending the sameX-Idempotency-Key on repeated calls hits the platform’s 24-hour cache and replays the FIRST response — handing you a token that expired long ago. The SDKs no longer derive keys, so this only happens if you set the header yourself (directly over REST, or by passing the same idempotencyKey twice). If you mint tokens for the same buyer repeatedly (a token-refresh endpoint, a plan-change link generator), use a fresh key per call or none at all.
Mint right before you redirect. The token lives 15 minutes (sliding), while a checkout or plan-change session lives 45. A token minted alongside the session and parked in a queue or an email will be dead by the time the buyer clicks. For plan-change links specifically, the token goes in the URL fragment — see Building the link the customer opens.