Transactions

Reverse a Sale or Refund

POST
/transactions/{id}/reversal

Cancel a transaction before funds are exchanged.

Transactions can be reversed in full or partially reversed.

An attempt to restore Payer's spending limit is always made.

If no amount is included in the request body, the full value of the transaction will be reversed.

In timeout scenarios, where the integrator does not recieve a response at all, the reference field can be used in place of the id in the URL

Availability of partial reversals depends on your live configuration.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token from POST /accesstoken, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*|

Header Parameters

X-GP-Idempotency?string

Integrator generated value submitted in the request header that is checked to ensure the same value has not been seen in the last 24 hours. It is used to ensure idempotency is maintained with this action.

Length1 <= length <= 50
X-GP-Version*string

The version of the API to execute the request.

Length1 <= length <= 50
Default"2021-03-22"

Request Body

application/json

account_name?string

A meaningful label that better identifies the account.

Length1 <= length <= 50
amount?string

An optional field that can be sent to indicate the amount to be reversed if you are setup for partial reversals. If no amount is provided, the entire transaction will be reversed.

Length1 <= length <= 50
reversal_reason?string

Used to record the reason for a reversal.

Length1 <= length <= 50

Value in

  • "CUSTOMER_CANCELLATION"
  • "TERMINAL_ERROR"
  • "TIMEOUT"
  • "CHIP_CARD_DECLINE"
  • "MACFAILURE"
  • "RESPONSE_RECEIVED_LATE"
  • "SUSPECTED_FRAUD"
  • "ARPC_CRYPTOGRAM_FAILURE"
  • "IN_STOCK"
  • "FALSE_POSITIVE"
  • "OTHER"
  • "NOT_GIVEN"
  • "SYSTEM_ERROR"
  • "OUT_OF_STOCK"
  • "FRAUD"
  • "DUPLICATE"
  • "MISTAKE"
currency_conversion?
payment_method?
device?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/transactions/TRN_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d/reversal" \  -H "X-GP-Version: 2021-03-22" \  -H "Content-Type: application/json" \  -d '{    "amount": "11099"  }'
{  "id": "TRN_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",  "time_created": "2026-05-03T21:23:39.718Z",  "time_last_updated": "2026-05-03T21:23:39.718Z",  "type": "SALE",  "status": "CAPTURED",  "amount": "11099",  "currency": "USD",  "country": "US",  "reference": "becf9f3e-4d33-459c-8ed2-0c4affc9555e",  "batch_id": "BAT_234234234",  "payment_method": {    "result": "string",    "message": "string",    "card": {      "authcode": "string",      "brand_reference": "string"    },    "bnpl": {      "provider": "KLARNA",      "result": "201 CREATED"    }  },  "device": {    "host_response_code": "string",    "brand_sequence_number": "string"  },  "action": {    "id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "type": "AUTHORIZE",    "time_created": "2026-05-03T21:23:39.718Z",    "result_code": "SUCCESS",    "app_id": "uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "app_name": "my_lovely_app"  }}