Reverse a payment
Learn how to reverse a payment with the Dojo API.
Use a reversal if you need to cancel a payment, for example if a customer has requested a payment to be canceled. You can reverse the full payment amount only.
Reversal scenarios
You can reverse a payment in the following scenarios:
State | captureMode:Auto | captureMode:Manual |
---|---|---|
Created | ||
Authorized | N/A | |
Captured |
* If reversed within 7 days of the original payment date.
* * If reversed on the same calendar day as the original payment date.
- Reversing a payment won't work in any other state.
- Once the reversal time limit expires, the payment can only be
refunded
. - Payments that were
captured
incaptureMode:Manual
can only be refunded, and notreversed
.
If you want to reverse a payment using the Dojo for Merchants App, see Reversing online checkout transactions.
Reverse using the Dojo API
To reverse a payment, use the endpoint below:
POST /payment-intents/{paymentIntentId}/reversal
In your request, include:
paymentIntentId
: This identifies the payment being reverse.
For the full API specification, see the reference.
Request example
The next example below shows how you would reverse the payment intent pi_pT08VyWG3EC_HQB4NBVliA
.
- cURL
- PowerShell
- Python
- C#
- PHP
loading...
loading...
loading...
loading...
loading...
Response example
If your request is successful, the response will return information about the reversal.
{
"message": "reverse for the order 3443",
"reversalId": "rvs_g8mCx87TykeQ6BOXqxZ9NQ"
}
Cancel a reverse
Once created, a reversal can't be canceled. You cannot reverse a reversal. You will have to create a new payment intent, instead.