Skip to main content

Reversal API

POST/rest/reverse

Reversal API is used to reverse (cancel) previously authorized transactions. This is essential when an authorization is no longer needed, such as when an order is cancelled before fulfillment or when reducing the authorized amount. Depending on the acquirer configured for your payment method, partial reversals (reversing less than the full amount) are supported.

note

Reversals can only be performed on authorized transactions that have not yet been captured. Once a transaction is captured, use the Refund API instead.

Reversal API Request

transaction_idStringrequired
ID of the authorized transaction to reverse
amountFloat
Amount to reverse. If omitted, full authorization amount is reversed. For partial reversals, specify the amount to reverse
Example Request
POST /rest/reverse
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"transaction_id": "8296188e-dd59-4c58-96da-4981976a8e06",
"amount": 12.40
}

Full vs Partial Reversals:

  • Full Reversal: Omit the amount parameter to reverse the entire authorized amount
  • Partial Reversal: Specify an amount less than the authorized amount to partially reverse the authorization. The remaining amount stays authorized and can be captured or reversed later.
note

Partial reversal support depends on your payment processor and acquirer configuration. Contact support to verify if partial reversals are available for your setup.

Reversal API Response

transaction_idString
ID of the reversed transaction
status_codeInteger
Status code of the reversal (12 for reversed)
statusString
Status of the reversal (typically "reversed")
order_idString
Order ID of the original transaction
messageString
Descriptive message about the reversal result
error_codeInteger
Error code for the response (0 for success)
Example Response
{
"transaction_id": "8296188e-dd59-4c58-96da-4981976a8e06",
"status_code": 12,
"status": "reversed",
"order_id": "123000",
"message": "Request successfully processed in test mode.",
"error_code": 0
}

Use Cases

Hotel Reservation Cancellation

1. Guest makes reservation → Authorize $500
2. Guest cancels before check-in → Reverse $500

Restaurant Order Adjustment

1. Authorize $100 for estimated bill
2. Customer leaves early, actual bill is $60 → Partial reverse $40
3. Later capture $60 for the actual charge

E-commerce Order Cancellation

1. Authorize payment when order placed
2. Customer cancels before shipping → Full reversal