Cycle Logo

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/reverse

Used to reverse cash payments and card-present transactions.

Card-Not-Present Reversals

POST /api/v1/payment/reversecnp

Used to reverse card-not-present transactions (e.g. online or saved cards).

Cash / Card-Present Reversal

Request fields for the /api/v1/payment/reverse endpoint.

Request Body

Field NameTypeDescription
LocationJsonObjectLocation object
LatitudeIntegerLatitude
LongitudeIntegerLongitude
CountryStringCountry
CountryCodeStringCountry code
ReceiptJsonObjectCheck sending object
EmailStringEmail for the check
PhoneStringPhone number
RetryNumIntegerNumber of sending attempts
DeviceInfoJsonObjectDevice object
PhoneManufacturerStringManufacturer
PhoneModelStringModel
DeviceIDStringDevice ID
DeviceTypeStringDevice type
AppFrameworkStringFramework applications
OSStringOperating system
OSVersionStringSystem version
AppIDStringApplication ID
BuildNumberStringBuild number
GMTIntegerTime zone
AppFrameworkStringFramework applications
LangStringLanguage
AcqTranJsonObjectAcquiring transaction object
AcquirerCodeStringAcquirer code
ExternalTerminalIDStringExternal terminal ID
ForceSignatureRequirementbooleanSign of unambiguous signature requirement
AdditionalAcquiringFieldsStringAdditional acquiring fields
BasicReverseTranJsonObjectBasic reverse transaction object
InputTypeIntegerInput type
CurrencyIDStringCurrency ID
ServiceIDStringIdentifier of the executing service
AmountDecimalTransaction amount
PartialReversebooleanPartial reverse sign
ReverseModeIntegerReverse type
ClientDateTimeStringDate and time on the client
AuxDataInputJsonObjectObject of formation of commodity items
TransactionIDStringOriginal transaction ID
CardJsonObjectCard object
CardInputModeIntegerCard entry method
CardDataInputJsonObjectCard data object
LinkedCardIdIntegerLinked card ID
IPStringIP 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 NameTypeDescription
LocationJsonObjectLocation object
ReceiptJsonObjectCheck sending object
DeviceInfoJsonObjectDevice object
AcqTranJsonObjectAcquiring transaction object
BasicReverseTranJsonObjectBasic reverse transaction object
InputTypeIntegerInput type
CurrencyIDStringCurrency ID
AmountDecimalTransaction amount
PartialReversebooleanPartial reverse sign
ReverseModeIntegerReverse type (Only 3 and 5 are used)
TransactionIDStringOriginal transaction ID
IPStringIP 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
}