Skip to main content
POST
Checkout Sessions
All paid endpoints on this page accept optional memo (≤ 1000 chars) and decisionContext (object) body fields. Stored on the receipt for debugging and audit — see Audit Trail.

Session Lifecycle

Both completed and canceled are terminal states — no further updates, completions, or cancellations are allowed. Sessions expire after 30 minutes. Expired sessions cannot be completed or updated.

Create Session

Creates a new checkout session for a product.

Request

Parameters

Response (201)

Use idempotency_key to safely retry session creation. If a session with the same key already exists, it returns the existing session (200) instead of creating a new one (201).

Retrieve Session

Returns the current state of a checkout session.
For completed sessions, the response includes an order object:

Update Session

Updates buyer info, input parameters, or switches product. Only allowed when status is ready_for_payment.
You can update any combination of buyer and line_items. Switching the item.id to a different product updates pricing automatically.

Complete Session

Submits payment and triggers tool execution. Requires a Stripe SharedPaymentToken.

Response (200)

Use request_id to poll job status via GET /v1/requests/{request_id}.

Error Responses


Cancel Session

Cancels a session. Only allowed when status is ready_for_payment or not_ready_for_payment.

Response (200)