Skip to main content
POST
Cancel checkout session

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Path Parameters

id
string
required

Checkout session ID

Response

OK

action
enum<string>
Available options:
create_subscription,
modify_subscription,
wallet_topup,
add_addon,
pay_invoice
cancel_url
string
cancelled_at
string<date-time>
checkout_invoice_id
string
checkout_payment_id
string
checkout_status
enum<string>
Available options:
initiated,
pending,
completed,
failed,
expired
completed_at
string<date-time>
created_at
string<date-time>
customer_id
string
expires_at
string<date-time>
failure_reason
string
failure_url
string
id
string
idempotency_key
string
metadata
object
next_poll_after_ms
integer

NextPollAfterMs is how long a client should wait before reading again. Zero means stop — either the session is terminal, or this response did not come from a polling read.

payment
object
payment_action
object
payment_provider
enum<string>
Available options:
razorpay,
chargebee
stale
boolean

Stale reports that this response is stored state that was not checked against the payment provider on this request — the read was debounced, or the gateway did not answer. A UI should say "still checking" rather than presenting a stale answer as fact.

success_url
string
terminal
boolean

Terminal reports whether the session has finished. Clients poll until this is true rather than hardcoding the status set, which would go stale if a status is ever added.

updated_at
string<date-time>