Skip to main content
POST
This endpoint cancels an active checkout session. Once canceled, the checkout cannot be completed or updated. This is useful when a customer abandons their cart or decides not to proceed with the purchase.

Authentication

This endpoint requires a valid API key with checkouts:write permissions.

Path Parameters

id
string
required
Unique identifier for the checkout session

Request Body

reason
string
Optional reason for canceling the checkout (e.g., “customer_requested”, “timeout”, “inventory_unavailable”)
message
string
Optional custom message about the cancellation

Response

id
string
Unique identifier for the Checkout Session
status
string
Status will be canceled after successful cancellation
buyer
object
Information about the buyer
line_items
array
Line items from the canceled checkout
totals
array
Final totals before cancellation
messages
array
Array including cancellation message
canceled_at
string
ISO 8601 timestamp of when the checkout was canceled