Cancel a PaymentIntent
POST {{baseUrl}}/v1/payment_intents/:intent/cancel
A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
or, in rare cases, processing
.
Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with a status
of requires_capture
, the remaining amount_capturable
will automatically be refunded.
You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
Request Body
[{"name"=>"cancellation_reason", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"expand[0]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"expand[1]", "value"=>"<string>", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |