Cancel a Checkout Session
Withdraws a pending Checkout Session so it can’t be paid, e.g. when the order is abandoned or changed. Fails with payment_in_progress once the Customer has started paying; wait for the outcome webhook instead. Unpaid sessions also cancel on their own after expiresAt, unless the Customer has started paying.
Authentication
Your secret key: sk_test_… in Test mode, sk_live_… in Live mode.
Path parameters
Response
Cancelled; a checkout_session.cancelled webhook is sent. Safe to retry: a repeat returns 409 invalid_state.
pending until the Customer pays or the session ends. succeeded: paid, safe to fulfil. failed: the payment was declined or didn’t go through. cancelled: you cancelled it or it expired unpaid. Only pending ever changes, and each change sends the matching checkout_session.* webhook.
test for a session made with an sk_test_ key, live for an sk_live_ key. Webhook endpoints each hear one mode, and the payload says which it came from.
Amount to charge, in FJD cents (minor units).
Transxact-hosted URL to redirect the Customer to.
Your own key/value data from creation; empty object if none was set.
Unix ms timestamp after which no payment can start; a still-pending session is then cancelled.
The Invoice number, such as INV-0007, when the session pays one of your Invoices; absent otherwise. Also in the webhook payload.
Present when you created the session with a quote: the USD or AUD price you sent, the FJD rate it was converted at (a decimal string), and the Unix ms time the rate was taken. amount is the FJD that is charged. Never shown to the Customer.