For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Cancels a checkout session. The session is locked against any further payment attempts, and every in-flight (non-terminal) transaction linked to the session is cancelled in the same call. Transactions that have already reached a terminal state (settled, failed, refunded) are not affected.
If a transaction on the session is being processed by a provider that does not support cancelling an in-progress transaction, the session enters the **`PENDING_CANCELLATION`** state instead of `CANCELLED`. While in this state, no further payment attempts can be initiated against the session, but the session is not considered fully cancelled until the in-flight transaction reaches a terminal state on its own. The response will list the unstoppable transactions in `pendingTransactionIds`.
Request
This endpoint expects an object.
sessionIdstringRequiredformat: "uuid"
Identifier of the checkout session to cancel. UUID v7.
reasonstringOptional
Optional free-form reason for the cancellation, recorded for reporting.
Response
Session cancellation accepted.
sessionIdstringformat: "uuid"
Identifier of the session that was cancelled. UUID v7.
statusenum
The resulting state of the session. CANCELLED indicates the session and all of its in-flight transactions have been cancelled. PENDING_CANCELLATION indicates the session is locked against further payment attempts, but at least one in-flight transaction belongs to a provider that does not support in-process cancellation — the session will move to CANCELLED once those transactions reach a terminal state.
Allowed values:
messagestring
Human-readable status message.
cancelledTransactionIdslist of strings
Transactions on the session that were cancelled as part of this call. UUID v7.
pendingTransactionIdslist of strings
Transactions still in flight that could not be cancelled because their provider does not support in-process cancellation. Populated only when status is PENDING_CANCELLATION. Each entry will progress to its own terminal state independently. UUID v7.
Cancels a checkout session. The session is locked against any further payment attempts, and every in-flight (non-terminal) transaction linked to the session is cancelled in the same call. Transactions that have already reached a terminal state (settled, failed, refunded) are not affected.
If a transaction on the session is being processed by a provider that does not support cancelling an in-progress transaction, the session enters the PENDING_CANCELLATION state instead of CANCELLED. While in this state, no further payment attempts can be initiated against the session, but the session is not considered fully cancelled until the in-flight transaction reaches a terminal state on its own. The response will list the unstoppable transactions in pendingTransactionIds.