Reversal Transaction

In this section you will learn how to process a reversal transaction

Reversal Overview

The purpose of a reversal transaction is to cancel a transaction during or after processing but before settlement.

🚧

Key points when cancelling a transaction

  • A reversal in a Hospitality environment reverses the entire transaction and NOT the amount specified in the request.

  • Partial Reversals are currently NOT supported by Elavon or PXP Financial Acquiring.

  • Any over authorised funds will be dealt with by the acquirer and card scheme by PXP sending the Scheme Reference Data

How to process a Reversal transaction request message

The merchant's system Posts a JSON Reversal transaction message to the ANYpay Gateway. Section Card Transactions describes the elements required to build a Reversal transaction request message.

An example of a Reversal transaction request message can be seen below.

{   
   "MerchantId": "BDD",
   "StoreId": "BDD500000005",
   "userId": "BDDTest",
   "clientSystemInvoiceId":"reversalSale1", 
   "clientSystemTransactionId":"reversalSale1-1", 
   "type":"reversalSale", 
   "amount":"20.20", 
   "currencyCode":"GBP", 
   "accountDetails":{   
      "cardNumber":"5454609899026213",
      "expiryDateMonth":"02",
      "expiryDateYear":"20",
      "originalTransactionId": "8a9be7db-bf5e-495c-b56f-148b84fe5d10"
   } 
}
{   
   "MerchantId": "BDD",
   "StoreId": "BDD500000005",
   "userId": "BDDTest",
   "clientSystemInvoiceId":"reversalPreAuthorization1", 
   "clientSystemTransactionId":"reversalPreAuthorization1-1", 
   "type":"reversalPreAuthorization", 
   "amount":"20.20", 
   "currencyCode":"GBP", 
   "accountDetails":{   
      "cardNumber":"5454609899026213",
      "expiryDateMonth":"02",
      "expiryDateYear":"20",
      "originalTransactionId": "8a9be7db-bf5e-495c-b56f-148b84fe5d10"
   } 
}

Handling a Reversal transaction response message

An example of a Reversal transaction response message can be seen below.

{
  "id": "7890ff90-e277-4ead-a7d8-6929a3f83286",
  "state": "Authorised",
  "providerStateCode": "000",
  "providerStateMessage": null,
  "currencyCode": "USD",
  "accountDetails": {
    "cardNumber": "444433******1111",
    "tokenizedCardNumber": "9997000000005071111",
    "isVisaCheckout": null
  },
  "details": {
    "providerMerchantId": "542929008043127",
    "providerTerminalId": "00630376"
  },
  "stateDetails": {
    "approvalCode": "06268A"
  },
  "cardSecurityResponseCode": null,
  "addressVerificationResponseCode": null
}
{
  "code": "4017740",
  "details": {
    "message": "Invalid username or password"
  }
}