Cancel Checkout
POST/checkouts/:checkoutId/cancelDescription
Cancels a pending checkout. If a payment was associated (direct or two_step) with a checkout session, the payment cascades to cancelled and a payment.cancelled webhook is fired.
⚠️
Cancellation is blocked once on-chain funds are observed — the customer’s deposit must settle or expire through the normal flow before the checkout can be released.
Headers
| Header | Description | Required |
|---|---|---|
| Authorization | Bearer token with your API key | yes |
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| checkoutId | string | The unique identifier of the checkout to cancel. | yes |
Example Request
const response = await fetch(
'https://checkout.exodus.com/checkouts/chk_1234567890abcdef/cancel',
{
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
},
}
);Response
SUCCESSFUL CANCELLATION
{
"id": "chk_1234567890abcdef",
"object": "checkout",
"amount": 5000,
"currency": "USD",
"description": "Premium Plan - Monthly",
"status": "cancelled",
"checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
"success_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel",
"customer_email": "[email protected]",
"metadata": {
"order_id": "12345"
},
"expires_at": "2024-01-16T12:00:00Z",
"created_at": "2024-01-15T12:00:00Z",
"cancelled_at": "2024-01-15T13:00:00Z"
}Error Responses
NOT FOUND
{
"error": {
"type": "not_found",
"message": "Checkout not found"
}
}NOT CANCELLABLE (409)
{
"error": {
"code": "checkout_not_cancellable",
"message": "Checkout cannot be cancelled — it is already completed, expired, or cancelled"
}
}FUNDS IN FLIGHT (409)
{
"error": {
"code": "checkout_has_funds_in_flight",
"message": "Customer funds are on-chain. Wait for settlement or expiry before cancelling."
}
}