Get a checkout session
The checkout.sessions.get operation: GET /api/v1/checkout/sessions/{id} in the REST API and the checkout_sessions_get tool in the MCP server.
/api/v1/checkout/sessions/{id}Returns a checkout session of the brand in the mode of the request: its status (open, blocked,
processing, complete, expired), line items, the current quote's totals and, once paid, the payment and
the invoice. A session past its expiry reads as expired even before the expiry job has run.
Use it after the customer returns to your success URL (?cs_id=…): fulfil your side when the status is
complete, or listen for checkout.session.completed.
At a glance
- REST:
GET /api/v1/checkout/sessions/{id} - MCP tool:
checkout_sessions_get - Operation ID:
checkout.sessions.get - Scope: Brand
- Permission:
checkout:read - Risk tier:
read - Dry run: Not supported
- Idempotency: Not needed (read only)
- Modes: Test and live
- Authentication: API key with the
checkout:readscope - Since: M4
Request
Path parameters
| Field | Type | Description |
|---|---|---|
id | cs_… ID | The checkout session's ID (cs_…). |
Query parameters
This operation takes no query parameters.
Response
200 OK with a JSON object:
| Field | Type | Description |
|---|---|---|
id | cs_… ID | |
object | "checkout.session" | |
livemode | boolean | |
entityId | ent_… ID | |
brandId | brd_… ID | |
mode | one of payment, subscription, topup, setup | |
status | one of open, processing, complete, expired, blocked | open, blocked (the sale is paused for the customer's location), processing, complete or expired. |
url | string or null | The hosted page (with its session key); null once complete or expired. |
lineItems | array of object | |
lineItems[].id | string | The line's ID in the session's quotes and its invoice. |
lineItems[].priceId | price_… ID | |
lineItems[].productId | prod_… ID | |
lineItems[].priceType | one of one_time, credit_pack, recurring | |
lineItems[].recurring | object or null | Recurring prices (subscription sessions): the billing interval and whether usage is metered. |
lineItems[].adjustableQuantity | object or null | The customer may change the quantity on the hosted page within these bounds. |
lineItems[].discount | money or null | Subscription sessions: what the promotion code takes off this line on the first invoice. |
lineItems[].description | string | The product's name when the session was created. |
lineItems[].quantity | integer | |
lineItems[].customAmount | money or null | |
lineItems[].amount | money | Before tax and discounts: gross for tax-inclusive prices, net for exclusive ones (a recurring price's first full period; zero for metered usage, billed later). |
lineItems[].taxBehavior | one of inclusive, exclusive | |
currency | string | |
customerId | cus_… ID or null | |
customerEmail | string or null | |
successUrl | string or null | |
cancelUrl | string or null | |
locale | string or null | |
collectBusinessDetails | one of auto, required, never | |
allowPromotionCodes | boolean | The hosted page offers a promotion code field. |
promotionCodeId | promo_… ID or null | The promotion code applied to the session. |
subscriptionData | object or null | Subscription sessions: the trial and the subscription's metadata. |
taxQuoteId | tq_… ID or null | The current quote (tax.quotes.get explains it). |
totals | object or null | The current quote's totals; null before the customer's details. |
blockedReason | one of evidence_conflict, unsupported_tax_category, registration_required, rate_unavailable, jurisdiction_blocked, tax_id_unavailable or null | |
waitlistEntryId | wl_… ID or null | |
paymentId | pay_… ID or null | |
invoiceId | inv_… ID or null | |
subscriptionId | sub_… ID or null | Subscription sessions: the subscription created; setup sessions: the one the method is for. |
paymentMethodId | pm_… ID or null | The payment method saved (subscription and setup sessions). |
expiresAt | date-time | |
completedAt | date-time or null | |
createdAt | date-time | |
metadata | object |
Examples
A paid session
GET /api/v1/checkout/sessions/cs_01m4tx5nj8emwbyf7y9vcf48aa
Authorization: Bearer or_test_…
Response (200):
{
"id": "cs_01m4tx5nj8emwbyf7y9vcf48aa",
"object": "checkout.session",
"livemode": false,
"entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
"brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4",
"mode": "payment",
"status": "complete",
"url": null,
"lineItems": [
{
"id": "1",
"priceId": "price_01m4tx5nj8emwbyf7y9vcf48ad",
"productId": "prod_01m4tx5nj8emwbyf7y9vcf48ae",
"priceType": "credit_pack",
"recurring": null,
"adjustableQuantity": null,
"discount": null,
"description": "Genno credits",
"quantity": 1,
"customAmount": null,
"amount": {
"amount": "100000000",
"currency": "EUR"
},
"taxBehavior": "inclusive"
}
],
"currency": "EUR",
"customerId": "cus_01m4tx5nj8emwbyf7y9vcf48ac",
"customerEmail": "anna@example.com",
"successUrl": "https://shop.example/thanks",
"cancelUrl": "https://shop.example/cart",
"locale": null,
"collectBusinessDetails": "auto",
"allowPromotionCodes": false,
"promotionCodeId": null,
"subscriptionData": null,
"taxQuoteId": "tq_01m4tx5nj8emwbyf7y9vcf48ab",
"totals": {
"net": {
"amount": "84033613",
"currency": "EUR"
},
"tax": {
"amount": "15966387",
"currency": "EUR"
},
"gross": {
"amount": "100000000",
"currency": "EUR"
}
},
"blockedReason": null,
"waitlistEntryId": null,
"paymentId": "pay_01m4tx5nj8emwbyf7y9vcf48af",
"invoiceId": "inv_01m4tx5nj8emwbyf7y9vcf48ag",
"subscriptionId": null,
"paymentMethodId": null,
"expiresAt": "2026-10-15T10:00:00.000Z",
"completedAt": "2026-10-14T10:03:12.000Z",
"createdAt": "2026-10-14T10:00:00.000Z",
"metadata": {
"order": "ord_1042"
}
}
Errors
| Code | HTTP status | When | What to do |
|---|---|---|---|
resource_not_found | 404 | No such checkout session for this brand and mode, or (on the hosted page) the session key is missing or wrong. | Check the ID and that your credentials are scoped to the right organization, entity, brand and mode. |
It can also return these common errors: validation_failed, api_version_unsupported, authentication_required, api_key_invalid, permission_denied, scope_required, dry_run_not_supported, rate_limited, internal_error.