---
title: "Retrieve a checkout session"
method: GET
path: "/v1/checkout-sessions/{checkout_id}"
tags: ["Checkout Sessions"]
---

# Retrieve a checkout session

`GET /v1/checkout-sessions/{checkout_id}`

Retrieve the details of a checkout session by its ID, including resolved product line items and charge information.

The `charge` field is `null` while the session is `OPEN` and populated once the customer submits a payment.

Requires `payments:read` scope.

## Path parameters

- `checkout_id` string, required

## Response `200`

Checkout session retrieved successfully.

- CheckoutSessionApiResponse — Checkout session details returned by `GET /v1/checkout-sessions/{checkout_id}`.
  - `checkout_id` string, required — Unique checkout identifier.
  - `status` 'OPEN' | 'COMPLETED' | 'EXPIRED' | 'CANCELLED', required — Current lifecycle status of the checkout session. `OPEN`: Awaiting customer payment. New sessions start here. `COMPLETED`: Payment succeeded. This is a terminal state. `EXPIRED`: The session window elapsed before payment. This is a terminal state. `CANCELLED`: Canceled before completion. This is a terminal state.
  - `recurring` CheckoutRecurring — The recurring cadence when the checkout starts a subscription. `null` for a one-time checkout.
    - `interval` 'day' | 'week' | 'month' | 'year', required — The billing interval.
    - `interval_count` integer — Number of intervals per billing cycle.
  - `payment_status` 'requires_payment_method' | 'requires_confirmation' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled', nullable — Payment lifecycle for the checkout. `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `canceled`.
  - `source_type` string, nullable — What created the checkout, e.g. `CHECKOUT_SESSION` or `API`.
  - `amount` string, required — Total amount in `currency`.
  - `currency` string, required — Base currency code.
  - `reference` string, nullable — Merchant-supplied or auto-generated reference.
  - `charge` PaymentResponse — Detailed payment response for API integrations.
    - `reference` string, nullable — Checkout reference when available.
    - `payment_id` string — Unique identifier for the payment.
    - `billing_reason` 'purchase' | 'subscription_create' | 'subscription_cycle' | 'subscription_update' — Why this payment exists. `purchase`: a one-time purchase. `subscription_create`: the first cycle of a new subscription. `subscription_cycle`: a subscription renewal. `subscription_update`: an off-cycle charge from a mid-cycle plan change (proration).
    - `checkout_id` string, nullable — Checkout identifier, when linked.
    - `status` 'created' | 'processing' | 'succeeded' | 'accepted' | 'failed' | 'expired' | 'cancelled' | 'refunded' | 'partially_refunded' | 'underpaid' | 'overpaid', required — payment status.
    - `is_refundable` boolean, nullable — Whether this payment can currently be refunded.
    - `amount` string, required — Requested amount in `currency`.
    - `amount_paid` string, nullable — Amount received so far.
    - `amount_remaining` string, nullable — Remaining amount still expected.
    - `currency` string, required — Payment currency code.
    - `fee_usd` string, nullable — Processing fee for this payment, converted to USD and expressed as a decimal string. `null` until the payment settles.
    - `merchant_bears_cost` boolean, nullable — Whether merchant bears processing cost.
    - `payment_method` string, nullable — Payment method used for this payment.
    - `channel` string, nullable — Origin channel (for example `api`).
    - `narration` string, nullable — payment description/narration.
    - `meta` object, nullable — Public metadata stored for this payment.
    - `message` string, nullable — Human-readable payment message derived from status.
    - `customer` object, nullable — Customer information when available.
      - `name` string, nullable — Full name of the customer associated with this payment, when captured.
      - `email` string, nullable — Customer email address associated with this payment, when captured.
    - `line_items` PaymentProductItem[], nullable — The line items this payment covers.
      - `product_id` string, required — Product identifier.
      - `product_name` string, required — Product display name.
      - `quantity` integer, required — Number of units purchased.
      - `unit_amount` string, required — Price per unit in `currency`.
      - `currency` string, required — Currency code for this line item.
      - `line_total` string, required — Total for this line item (`unit_amount` × `quantity`).
    - `subscription_id` string, nullable — The subscription this payment belongs to, or `null` for a one-time purchase.
    - `invoice` PaymentInvoiceInfo — A subscription invoice this payment collected.
      - `invoice_id` string, required — The invoice's identifier.
      - `number` string, nullable — Human-facing invoice number, if assigned.
      - `subscription_id` string, nullable — The subscription the invoice belongs to.
      - `period_start` string, date-time — Start of the billing period, UTC.
      - `period_end` string, date-time — End of the billing period, UTC.
      - `kind` 'cycle' | 'proration' — `cycle`: a regular subscription-period invoice. `proration`: an off-cycle mid-cycle change.
    - `refunds` string[], nullable — IDs of any refunds issued for this payment. `null` if no refund has been created.
    - `status_history` object[], nullable — Chronological list of status changes for this payment.
      - `status` string — Status at this point in time.
      - `occurred_at` string, date-time — When this status change occurred.
      - `provider_reference` string, nullable — Provider-side reference for this transition.
      - `reason` string, nullable — Human-readable reason for the status change, if available.
    - `created_at` string, date-time, required — Creation timestamp.
    - `updated_at` string, date-time, required — Last update timestamp.
    - `completed_at` string, date-time, nullable — Completion timestamp when available.
  - `payment_method` string, nullable — The payment method selected for the checkout, if any.
  - `customer` CheckoutCustomer — The customer attached to the checkout.
    - `id` string, nullable — The customer's ID, once resolved. `null` until a customer is matched or created.
    - `email` string, required — The customer's email address.
    - `name` string, nullable — The customer's name. `null` when not provided.
  - `success_url` string, uri, nullable — URL the customer is redirected to after successful payment.
  - `cancel_url` string, uri, nullable — URL the customer is redirected to if they cancel.
  - `products` ResolvedProductItem[], nullable — Resolved product line items. Populated for `CART` sessions; may be `null` for `SELECTION` sessions before the customer picks a product.
    - `product_id` string, required — Product identifier.
    - `product_name` string, required — Product display name.
    - `quantity` integer, required — Number of units.
    - `unit_amount` string, required — Price per unit in `currency`.
    - `currency` string, required — Currency code for this line item.
    - `price_type` 'fixed' | 'free' | 'custom', required — How the product is priced. `fixed`: a set amount, given in `amount`. `free`: no charge. `custom`: the customer pays what they want, bounded by `minimum_amount` and `maximum_amount` with an optional `preset_amount` suggestion.
    - `minimum_amount` string, nullable — Minimum allowed amount when `price_type` is true.
    - `maximum_amount` string, nullable — Maximum allowed amount when `price_type` is true.
    - `line_total` string, required — Total for this line item (`unit_amount` × `quantity`).
  - `billing_currency` string, nullable — Currency the customer selected for billing.
  - `session_mode` 'CART' | 'SELECTION', nullable — How products are presented. `CART` sums a fixed set of items; `SELECTION` lets the customer pick one from a group.
  - `metadata` object, nullable — Public metadata you attached at session creation.
  - `created_at` string, date-time, required — ISO 8601 creation timestamp.
  - `expires_at` string, date-time, nullable — ISO 8601 expiry timestamp.
  - `completed_at` string, date-time, nullable — ISO 8601 timestamp when the session was completed.
  - `updated_at` string, date-time, required — ISO 8601 last-updated timestamp.

## Other responses

- `401` — Unauthorized - Invalid, missing, or expired API key. Verify your API key is correctly formatted and included in the Authorization header as `Bearer sk_sandbox_...` or `Bearer sk_live_...`. Check that your key hasn't been revoked.
- `403` — Forbidden - API key does not have permission for the requested resource. Verify you're using the correct organization's API key and that you're not trying to access another organization's data.
- `404` — Not Found - The requested resource does not exist. Verify the resource ID is correct and that it belongs to your organization.
- `429` — Too Many Requests - Rate limit exceeded. Standard tier allows 100 requests per minute per API key. Wait a few seconds before retrying. Check X-RateLimit-Reset header for when the window resets.

---

[API](https://skmtc.dev/bachs/apis/bachs-api.md) · [All operations](https://skmtc.dev/bachs/apis/bachs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bachs/bachs-api/revisions/f29efa8a22df/schema)
