Cancel a payment intent
Requests cancellation for an intent that has not been captured. Most
non-terminal states become canceled immediately; a requires_capture
intent first voids its authorized charge. A processing intent can
remain processing while its in-flight outcome resolves, so poll the
intent or consume webhooks for its next state. The body is optional; an
absent body supplies no reason.
Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Path Parameters
The payment intent id (pi_…).
Body
Optional cancellation reason (max 256 chars).
Response
The updated payment intent. It can remain processing while cancellation is pending; otherwise its status is canceled.
The payment intent id (pi_…).
Always payment_intent.
payment_intent The owning merchant (mer_…).
Whether this intent was created with a live (true) or test (false) key.
Returned when the intent is created or confirmed; null on capture, cancel, and list responses.
The attached customer (cus_…). Null unless a customer was passed at creation.
The amount to collect, in minor units. Always positive.
Three-letter ISO currency code. USD, EUR, and GBP are supported.
automatic captures the charge on confirmation. manual authorizes a hold; capture it later via POST /payment_intents/{id}/capture.
automatic, manual One of requires_payment_method (collect or attach a payment method), requires_confirmation (ready to confirm), processing (payment is in progress), requires_action (the buyer must complete another step), requires_capture (authorized and awaiting manual capture), succeeded (payment completed), or canceled (payment can no longer be completed).
requires_payment_method, requires_confirmation, requires_action, requires_capture, processing, succeeded, canceled The attached payment method (pm_…). Nullable; cleared on a decline so a retry can attach a different method.
The most recent charge produced by this intent (ch_…).
A string key-value map for storing your own structured data. Up to 50 keys; each key at most 40 characters and each value at most 500 characters.
Unix epoch seconds.
Unix epoch seconds, bumped on every mutation.
Browser-safe card-fields configuration returned with client_secret on publishable-key requests. Null when card collection is not available.
Your order number or other reference. Max 256 characters.

