PaybytokenDocs
Checkout Sessions
API reference · Checkout Sessions

Retrieve a Checkout Session

Retrieve the current order and payment state for a Checkout Session.

GET /api/v1/checkout_sessions/:id

Retrieves a Checkout Session owned by the authenticated merchant account. Use this server-side to reconcile the order or refresh a customer-facing status page.

Request

curl https://api-prod.paybytoken.io/api/v1/checkout_sessions/chk_test_RzULZl7bkylpMyo7bkHxinc2 \
  -H "Authorization: Bearer $PAYBYTOKEN_SECRET_KEY"
ParameterLocationTypeDescription
idpathstringchk_test_... or chk_live_... Checkout Session ID.

The key mode must match the resource mode.

Response

{
  "id": "chk_test_RzULZl7bkylpMyo7bkHxinc2",
  "account_id": "acct_merchant",
  "payment_intent_id": "pay_t24c9qLoGieNDhvHVHWo",
  "url": "https://checkout.paybytoken.io/pay?session_id=chk_test_RzULZl7bkylpMyo7bkHxinc2",
  "amount_subtotal": "50.00",
  "amount_total": "50.00",
  "currency": "USD",
  "mode": "payment",
  "selected_token_id": "tok_base_usdc",
  "status": "open",
  "ui_mode": "hosted",
  "allowed_origin": null,
  "metadata": {
    "order_id": "order_1234"
  },
  "expired_at": "2026-07-29T10:30:00.000Z",
  "created_at": "2026-07-29T09:30:00.000Z",
  "updated_at": "2026-07-29T09:34:12.000Z",
  "current_mode": "test",
  "payment_intent": {
    "id": "pay_t24c9qLoGieNDhvHVHWo",
    "chain": "base",
    "currency": "USDC",
    "status": "requires_payment_method"
  },
  "branding": {
    "version": 1,
    "display_name": "Example Store",
    "logo_url": "https://cdn.example.com/brand/logo.png",
    "brand_color": "#0E0F0C",
    "brand_foreground_color": "#FFFFFF",
    "accent_color": "#9FE870",
    "accent_foreground_color": "#000000"
  }
}

The response also contains the original line items and supported token metadata. When a token has been confirmed, payment_intent contains the related Payment Intent state.

client_secret is deliberately absent, including for embedded sessions. If an embedded credential is lost or expired, create a new Checkout Session instead of retrieving or reusing it.

See the Checkout Session object for field definitions.

Fulfillment

Retrieval is useful for reconciliation, but normal fulfillment should be driven by a verified payment_intent.succeeded webhook. A browser redirect or SDK complete event alone is not proof of payment. See Fulfill orders with webhooks.

On this page

API Workbench

Full Explorer

Open in new tab