Get a checkout session, including its diagnosis
/checkout-sessions/{checkout_session_id}AuthorizationBearer token (JWT) · headerrequiredJWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in
production; a simulator in test). The client obtains it and sends it as a Bearer token on
every authenticated call. Sarvex's services verify it — issuer, audience, signature
(IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue
or revoke these tokens. merchant_id/store_id are read from the verified claims (and the
merchant→store mapping), never from the URL. The operator scope is required for
/operator/*. Operators acting on a specific merchant pass the X-Operate-As header,
which is recorded in the audit log.
checkout_session_idstringrequiredA checkout session the caller's merchant owns. Authorized server-side against the principal; not a free-form tenant selector.
Checkout session.
checkout_idstringstore_idstringsurfacestringThe checkout surface. There is exactly one — UCP checkout.
ucp_checkoutagent_platformstring | nullBest-effort agent platform identification; absent when unavailable.
statecheckout_session_stateinitiatedcart_activeescalatedawaiting_paymentcompletedfailedabandonedcurrent_stagestringstarted_atstring<date-time>last_activity_atstring<date-time>terminal_atstring<date-time> | nullcart_summarycart_summaryShow propertiesHide properties
currencystringtotal_minorintegerAmount in minor units (cents).
item_countintegerescalationobject | nullShow propertiesHide properties
reasonstringescalated_atstring<date-time>continue_url_issuedbooleanreturned_atstring<date-time> | nullSet once any further session activity is observed after the escalation — the checkout flow has no explicit "buyer clicked continue_url" signal, so any subsequent event is the proxy.
resolvedbooleanTrue once the session reaches a terminal state after having been escalated at least once.
failureobject | nullShow propertiesHide properties
codestringRaw failure code (e.g. CONNECTOR_CREATE_FAILED, FRESHNESS_GUARD_FAILED, ORDER_CREATION_FAILED).
causestringClassified cause — see checkout_diagnosis.cause.
stagestringdiagnosisobject | nullShow propertiesHide properties
stage_reachedstringcausestringClosed classification — see internal/pkg/checkoutcause.Cause.
connector_create_failedconnector_update_failedpricing_staleorder_creation_failedescalation_stalledbuyer_abandonedunknownplain_language_summarystringrecommended_actionstringevidenceinteger[]The specific timeline seq values supporting this conclusion.
event_countintegerupdated_atstring<date-time>Resource not found within the caller's tenant.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequireddetailsobject | null