Reverse a Transaction
Reverse a payment using the REST API for cash, card-present, or card-not-present transactions.
Endpoints
Card-Present / Cash Reversals
POST /api/v1/payment/reverseUsed to reverse cash payments and card-present transactions.
Card-Not-Present Reversals
POST /api/v1/payment/reversecnpUsed to reverse card-not-present transactions (e.g. online or saved cards).
Important Notes on Reversals
- You must include the original
TransactionIDin the request. - For partial reversals, set
"PartialReverse": trueand include the refund amount. - For SBP reversals, a 15-minute delay is required before initiating, and only returns are supported (
ReverseMode = 5). - Appropriate user permissions are required to reverse transactions made by other agents.
Cash / Card-Present Reversal
Request fields for the /api/v1/payment/reverse endpoint.
Request Body
| Field Name | Type | Description |
|---|---|---|
Location | JsonObject | Location object |
Latitude | Integer | Latitude |
Longitude | Integer | Longitude |
Country | String | Country |
CountryCode | String | Country code |
Receipt | JsonObject | Check sending object |
Email | String | Email for the check |
Phone | String | Phone number |
RetryNum | Integer | Number of sending attempts |
DeviceInfo | JsonObject | Device object |
PhoneManufacturer | String | Manufacturer |
PhoneModel | String | Model |
DeviceID | String | Device ID |
DeviceType | String | Device type |
AppFramework | String | Framework applications |
OS | String | Operating system |
OSVersion | String | System version |
AppID | String | Application ID |
BuildNumber | String | Build number |
GMT | Integer | Time zone |
AppFramework | String | Framework applications |
Lang | String | Language |
AcqTran | JsonObject | Acquiring transaction object |
AcquirerCode | String | Acquirer code |
ExternalTerminalID | String | External terminal ID |
ForceSignatureRequirement | boolean | Sign of unambiguous signature requirement |
AdditionalAcquiringFields | String | Additional acquiring fields |
BasicReverseTran | JsonObject | Basic reverse transaction object |
InputType | Integer | Input type |
CurrencyID | String | Currency ID |
ServiceID | String | Identifier of the executing service |
Amount | Decimal | Transaction amount |
PartialReverse | boolean | Partial reverse sign |
ReverseMode | Integer | Reverse type |
ClientDateTime | String | Date and time on the client |
AuxDataInput | JsonObject | Object of formation of commodity items |
TransactionID | String | Original transaction ID |
Card | JsonObject | Card object |
CardInputMode | Integer | Card entry method |
CardDataInput | JsonObject | Card data object |
LinkedCardId | Integer | Linked card ID |
IP | String | IP address |
Example Request (Cash Reversal)
{
"Location": {
"Latitude": -29.0,
"Longitude": 24.0
},
"Country": "South Africa",
"CountryCode": "ZA",
"DeviceInfo": {
"PhoneManufacturer": "Company",
"PhoneModel": "Windows_RestAPI",
"DeviceID": "",
"DeviceType": "1",
"AppFramework": "java",
"OS": "Windows",
"OSVersion": "10",
"AppID": "RestAPI",
"BuildNumber": "2.4.390248"
},
"GMT": 2,
"AppFramework": "java",
"IP": "102.132.95.88",
"Lang": "en",
"AcqTran": {
"AcquirerCode": "CASH"
},
"BasicReverseTran": {
"InputType": 10,
"TransactionID": "8A70BC19-4FD1-4E03-8422-D230BAE573DB",
"PartialReverse": false,
"ReverseMode": 2,
"CurrencyId": "ZAR",
"Amount": 10
}
}Card-Not-Present Reversal
Request fields for the /api/v1/payment/reversecnp endpoint.
Request Body
| Field Name | Type | Description |
|---|---|---|
Location | JsonObject | Location object |
Receipt | JsonObject | Check sending object |
DeviceInfo | JsonObject | Device object |
AcqTran | JsonObject | Acquiring transaction object |
BasicReverseTran | JsonObject | Basic reverse transaction object |
InputType | Integer | Input type |
CurrencyID | String | Currency ID |
Amount | Decimal | Transaction amount |
PartialReverse | boolean | Partial reverse sign |
ReverseMode | Integer | Reverse type (Only 3 and 5 are used) |
TransactionID | String | Original transaction ID |
IP | String | IP address |
Example Request (CNP Reversal)
{
"Location": {
"Latitude": -29.0,
"Longitude": 24.0
},
"Country": "South Africa",
"CountryCode": "ZA",
"DeviceInfo": {
"PhoneManufacturer": "Company",
"PhoneModel": "Windows_RestAPI",
"DeviceID": "",
"DeviceType": "1",
"AppFramework": "java",
"OS": "Windows",
"OSVersion": "10",
"AppID": "RestAPI",
"BuildNumber": "2.4.390248"
},
"GMT": 2,
"AppFramework": "java",
"IP": "183.168.81.92",
"Lang": "en",
"AcqTran": {
"SingleStepAuthMode": true,
"AcquirerCode": "FIMI"
},
"BasicReverseTran": {
"InputType": 3,
"TransactionID": "1BA1CCD8-0BA6-4A3A-B79B-6FD83D4C9A5E",
"PartialReverse": false,
"ReverseMode": 3,
"CurrencyId": "ZAR",
"Amount": 10
}
}Example Response
The response structure is the same for both reversal endpoints. The main object is `Transaction`.
{
"TransactionReverseID": "5C1916A3-1B44-4288-A2C0-1CC0703A27DC",
"TransactionID": "5C1916A3-1B44-4288-A2C0-1CC0703A27DC",
"EMVOnlineProcessingResult": null,
"AdditionalAcquiringFields": null,
"AdditionalAcquiringFieldsTitle": null,
"TerminalName": null,
"EMVData": null,
"RequireSignature": false,
"Transaction": {
"ID": "5C1916A3-1B44-4288-A2C0-1CC0703A27DC",
"Description": null,
"SmartDescription": "",
"Invoice": "7ETMUSNAAUXN",
"ReverseInvoice": "7ERZK8AAAUXN",
"ScheduleID": 0,
"AcquirerID": "ABSA",
"ClientID": 18349,
"BranchID": 18349,
"PosID": 19083,
"CurrencyID": "ZAR",
"Amount": 100.0000,
"State": 500,
"Substate": 502,
"Status": "IN-TRANSFER",
"ReverseMode": 3,
"AcquirerTranID": "D77CC0CE",
"InputType": 4,
"Date": "2021-11-30T18:10:31.197",
"ApprovalCode": "SIMULATION",
"ReverseID": "D77CC0CE-C6FD-4610-A8CB-6E58CE730DD4"
},
"ErrorCode": 0,
"ErrorMessage": null,
"Validations": null
}