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.
/checkout_sessions/{id}AuthorizationBearer token (JWT) · headerrequiredidstringrequiredThe checkout session token (not a numeric ID)
Checkout session
tokenstringstatusstringorder_idintegerreturn_urlstring | nullWhere 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> | nullview_countintegercheckout_urlstringSession expired
messagestringreplacementCheckoutSessionShow propertiesHide properties
tokenstringstatusstringorder_idintegerreturn_urlstring | nullWhere 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> | nullview_countintegercheckout_urlstring