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 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 status=’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

KeyDatatypeRequiredDescription
Content-Typestring