Checkout session ( checkout_session )
A checkout_session represents a request for payment or credit initiated by your platform on behalf of a buyer. It provides a URL to a User Journey completed by the buyer and automatically drives an orchestration process handling the payment flow end to end.
Role
The checkout session is the entry point of the purchase flow. It carries two independent dimensions: the session lifecycle (is it still active?) and the financial outcome (what was decided for payment?). Separating them lets the process close the session (
status: completed) regardless of the outcome — immediate payment, granted credit, or failure — without ambiguity.
At creation, an orchestration process is started automatically. That process drives the User Journey, communicates with payment providers, and updates session statuses through dedicated nodes.
Identifier and structure
Each session has a stable identifier prefixed with cs_. The
object field is "checkout_session".
{
"object": "checkout_session",
"id": "cs_5e2d8f1a9b3c4d7e",
"status": "open",
"payment_status": "unpaid",
"buyer_id": "cmp_3a8f1d9c2b4e7f6a",
"buyer_contact_id": "ctc_d12e3f4a5b6c7d8e",
"process_definition_id": "prd_1a2b3c4d5e6f7a8b",
"process_instance_id": "pci_9a8b7c6d5e4f3a2b",
"process_status": "running",
"currency": "eur",
"amount_excluding_tax": 100000,
"amount_tax": 20000,
"amount_including_tax": 120000,
"billing_details": null,
"shipping_details": null,
"locale": "fr",
"url": "https://checkout.example.com/c/cs_5e2d8f…",
"return_url": "https://example.com/checkout/return",
"expires_at": "2026-06-18T10:00:00.000Z",
"closed_at": null,
"source_reference": "ORDER-2026-00842",
"metadata": {},
"created_at": "2026-06-17T10:00:00.000Z"
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Session identifier (prefix `cs_`). |
object | string | Always "checkout_session". |
merchant_id | string | Merchant owning the session. |
status | enum | Lifecycle: `open`, `completed`, `expired`, `cancelled`. |
payment_status | enum | Financial outcome: `unpaid`, `authorized`, `paid`, `credit_granted`, `failed`, `cancelled`. |
buyer_id | string | Buyer company (`cmp_…`). Optional when the buyer does not yet exist at startup. |
buyer_contact_id | string | Buyer contact required for the session (`ctc_…`). |
process_definition_id | string | Checkout process definition launched. Resolved automatically when absent. |
process_instance_id | string | Process instance currently driving the session (`pci_…`). May change during corrective resume. |
process_status | enum | Execution state derived from the associated instance: `running`, `waiting`, `stopping`, `completed`, `failed`, `retry_exhausted`, `superseded`, `stopped`, or null. |
sales_channel | enum | null | Sales channel: `web`, `pos`, `admin`, `marketplace`, `call_center`, `edi`, `other`, or null. |
currency | string | ISO 4217 currency code in lowercase (for example `eur`). |
amount_excluding_tax | integer | Amount excluding tax in cents. Must satisfy: excluding tax + tax = including tax. |
amount_tax | integer | Tax amount in cents. |
amount_including_tax | integer | Amount including tax in cents. Must satisfy: excluding tax + tax = including tax. |
billing_details | address | Billing address (optional). |
shipping_details | address | Shipping address (optional). |
locale | string | User Journey language (for example `fr`, `en`). |
url | string | User Journey URL to provide to the buyer. |
return_url | string | Redirect URL after experience completion. |
expires_at | datetime | Automatic expiration date. Default: 24 hours after creation. |
closed_at | datetime | Timestamp when final status was reached. `null` while still open. |
source_reference | string | Order or cart reference in your system. |
metadata | object | Flat map of `string | number | boolean` scalars, following the API metadata convention. |
created_at | datetime | Creation date. |
updated_at | datetime | Last update date. |
Lifecycle (status)
The field status follows the session lifecycle. A session always starts at open and transitions to one of three final states.
| Value | Meaning | Final ? |
|---|---|---|
open | Active session. The buyer can interact with the User Journey. | No |
completed | Completed session. The financial outcome remains carried separately by payment_status. | Yes |
expired | Session expired without completion. Can be triggered manually or automatically. | Yes |
cancelled | Session canceled by your platform before any decision. | Yes |
A final status cannot be changed. Only an open session may be expired through POST /v1/checkout/sessions/:id/expire.
Financial outcome (payment_status)
The field payment_status records the financial outcome of the session independently from its lifecycle. It is updated by the checkout process through the update_checkout_session_payment_status or
finalize_checkout_session.
| Value | Meaning |
|---|---|
unpaid | Initial value. No financial outcome recorded. |
authorized | Payment authorized by the provider (for example 3DS validated) but not yet captured. |
paid | Payment captured and collected. |
credit_granted | Credit granted — the buyer will pay later according to credit terms. |
failed | Failed payment attempt. |
cancelled | Payment canceled before capture. |
status answers “is the session still usable?”
payment_status answers “what was decided financially?”. A session can be completed with payment_status: failed — the process made a decision (payment failed) and the session is closed.
Associated process
A session created with a checkout process exposes two pieces of execution information:
process_instance_id, the instance currently driving the session, and
process_status, its current state. process_status is computed from the associated instance; it is not a third business status of the checkout session.
| Example | Interpretation |
|---|---|
status: open + process_status: running | The session is open and processing is ongoing. |
status: open + process_status: failed | Processing stopped with an error, but no business conclusion was invented for the session. |
status: completed + process_status: completed | Both the session and its execution reached completion. |
A completed instance does not automatically move the session to
completed. A failed, retry_exhausted, or stopped instance does not force payment_status: failed or
status: cancelled. The finalize_checkout_session node does not infer those fields either; explicit update nodes remain authoritative over these business fields.
A manual retry, retry_step / skip_step fork, or resume of a user step may create a new instance to continue the same session. In that case, process_instance_id is transferred to the new instance and process_status immediately reflects its state. The old instance remains visible in orchestration history but is no longer the canonical execution of the session.
See Errors and idempotency for detailed retry, fork, and associated-instance transfer rules.
Amounts
The three amount fields are expressed in cents (non-negative integers) in the currency indicated by currency (lowercase ISO 4217 code). The following constraint is checked at creation:
amount_excluding_tax + amount_tax = amount_including_tax
Example for an order of EUR 1,000 excluding tax with 20% VAT:
{
"currency": "eur",
"amount_excluding_tax": 100000,
"amount_tax": 20000,
"amount_including_tax": 120000
}Currency is normalized to lowercase on persistence. Attached line items (line_items) must use the same currency.
URL and expiration
The field url contains the User Journey address to provide to the buyer (redirect, email link, iframe). This URL is returned directly in the creation response — no additional call is required.
The session automatically expires at expires_at. When this field is not supplied at creation, the platform sets expiration to
24 hours after creation. Once expired, the URL is no longer accessible and the session moves to status: expired.
You can also expire an open session manually before its deadline:
POST /v1/checkout/sessions/cs_5e2d/expire
{
"status": "expired",
"closed_at": "2026-06-17T11:30:00.000Z"
}Lignes d'article
Line items can be attached at session creation through the
line_itemsfield. They are then accessible through
GET /v1/checkout/sessions/:id/line-items. Lines cannot be modified after creation.
Once attached, lines are available to any logic that needs them: showing order details to the buyer in the User Journey, sending them to a fraud-prevention partner analyzing item nature or value, or using them in your own business rules.
In processes
The checkout_session is the central object for checkout processes. It is automatically injected as a process input at startup and flows between nodes as a typed platform.checkout_session.
| Node | Role | Key inputs / outputs |
|---|---|---|
update_checkout_session_payment_status | Updates only the financial outcome | Accepts: checkout_session, payment_status · Produces: checkout_session |
update_checkout_session_status | Updates only the lifecycle | Accepts: checkout_session, status · Produces: checkout_session |
finalize_checkout_session | Updates payment_status and status in one operation | Accepts: checkout_session, payment_status, status · Produces: checkout_session |
The node finalize_checkout_session is the recommended pattern for closing a session at process end — it guarantees that both dimensions are updated atomically.
If the session was created without process_definition_id, the platform automatically selects the process launcher of type checkout
configured for your merchant account. The process must accept an input of type
platform.checkout_session named checkout_session.
Events
| Event | Trigger |
|---|---|
checkout_session.created | The session was just created and the process started. |
checkout_session.completed | `status` changed to `completed`. |
checkout_session.expired | `status` changed to `expired` (manually or automatically). |
Changing to cancelled does not trigger a dedicated event. Only
completed and expired produce a transition event. Each event includes the complete checkout_session object in its payload.