Skip to content
BolderBolder API
Esc
navigateopen⌘Jpreview

Get a checkout session

Resolves a checkout session by its token. Does not auto-rotate an expired session the way the hosted checkout page does — an expired session returns 410 with a replacement session in the body.

GET/checkout_sessions/{id}
Authorization
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
The checkout session token (not a numeric ID)
Responses
200Checkout session
tokenstring
statusstring
order_idinteger
return_urlstring | null
Where the buyer is redirected after a hosted-redirect-mode gateway round-trip (see storefronts headless-reference.md). Set at most once per session lineage — the first non-blank `return_url` given to `POST /orders/{order_id}/checkout_session` wins; later calls while the same session is still active are ignored. Carried forward automatically if the session is later forked due to a stale cart total.
expires_atstring<date-time>
last_viewed_atstring<date-time> | null
view_countinteger
checkout_urlstring
410Session expired
messagestring
replacementCheckoutSession
Show properties
tokenstring
statusstring
order_idinteger
return_urlstring | null
Where the buyer is redirected after a hosted-redirect-mode gateway round-trip (see storefronts headless-reference.md). Set at most once per session lineage — the first non-blank `return_url` given to `POST /orders/{order_id}/checkout_session` wins; later calls while the same session is still active are ignored. Carried forward automatically if the session is later forked due to a stale cart total.
expires_atstring<date-time>
last_viewed_atstring<date-time> | null
view_countinteger
checkout_urlstring
Request
curl -X GET "https://api.onbolder.com/v2/checkout_sessions/string" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "token": "string",
  "status": "string",
  "order_id": 0,
  "return_url": "string",
  "expires_at": "2019-08-24T14:15:22Z",
  "last_viewed_at": "2019-08-24T14:15:22Z",
  "view_count": 0,
  "checkout_url": "string"
}