Refund a completed payment

Outlines refunding a payment by reversing it using a transaction ID to reference the payment.


Reverse a completed payment where the card that made the payment originally is not available. Use the POITransactionID to reference the original payment.

There are 2 ways to reverse a payment via the Terminal API:

  1. Submit a reversal to the same terminal that did the original payment.
  2. Reverse a payment on a different terminal.

For both options, only reverse a complete transaction. Partial reversals not supported from the PED.

If a ReversedAmount is specified it will be ignored. Currently, partial referenced refunds are available only using the modification API. Reversal is idempotent. Reversals are not returned in a transaction status request.

Contact POS Support Team to allow their account to do refund amounts higher than the original transaction.

Endpoint 

The URL used to send  Terminal API  messages depends on your type of implementation. For more information on the architectures available, see the Terminal API Overview .

Request

For a list of ReversalRequest fields, see ReversalRequest fields.

The SaleID and ServiceID in the MessageHeader should be unique. SaleID and ServiceID combinations are rejected if used recently, within 48 hours.

ReversalRequest
{
   "SaleToPOIRequest" : {
      "MessageHeader" : {
         "MessageClass" : "Service",
         "MessageType" : "Request",
         "ProtocolVersion" : "3.0",
         "SaleID" : "POSSystemID12345",
         "POIID" : "MX925-260193322",
         "ServiceID" : "13731",
         "MessageCategory" : "Reversal"
      },
      "ReversalRequest" : {
         "OriginalPOITransaction" : {
            "POITransactionID" : {
               "TimeStamp" : "2017-07-03T07:45:44.000Z",
               "TransactionID" : "oLkO001499071089010"
            }
         },
         "ReversalReason" : "MerchantCancel"
      }
   }
}
{
   "SaleToPOIRequest" : {
      "MessageHeader" : {
         "MessageClass" : "Service",
         "SaleID" : "POSSystemID12345",
         "MessageCategory" : "Reversal",
         "ServiceID" : "21736",
         "MessageType" : "Request",
         "POIID" : "MX925-123456789",
         "ProtocolVersion" : "3.0"
      },
      "ReversalRequest" : {
         "OriginalPOITransaction" : {
            "POITransactionID" : {
               "TimeStamp" : "2017-06-29T07:58:45.000Z",
               "TransactionID" : "oLkO00198816331007"
            },
            "POIID" : "MX925-260193322"
         },
         "ReversalReason" : "MerchantCancel"
      }
   }
}

The POITransactionID returned by the Terminal API consists of a PSP reference and a Tender reference. The format of the TransactionID is: < tenderref>.<pspref>, for example, oLkO001503399575001.9815033996072250.

If a PSP reference has not yet been generated, the TransactionID will only consist of a tender reference. This could occur if the transaction was completed offline.

If a ReversedAmount is specified in the ReversalRequest, the Adyen payments platform ignores it. The reply will include a message which states: "Field not supported".

Response

For a list of Reversal Response fields, see ReversalResponse fields.

An authorisation is attempted and you receive a response with the following fields:

ReversalResponse
{
   "SaleToPOIResponse" : {
      "ReversalResponse" : {
         "POIData" : {
            "POITransactionID" : {
               "TimeStamp" : "2017-08-22T11:00:32.000Z",
               "TransactionID" : "9815033996432330"
            }
         },
         "Response" : {
            "Result" : "Success"
         }
      },
      "MessageHeader" : {
         "MessageType" : "Response",
         "SaleID" : "POSSystemID12345",
         "ServiceID" : "13731",
         "MessageClass" : "Service",
         "POIID" : "MX925-260193322",
         "MessageCategory" : "Reversal",
         "ProtocolVersion" : "3.0"
      }
   }
}

{
  "SaleToPOIResponse": {
    "ReversalResponse": {
      "Response": {
        "Result": "Failure",
        "AdditionalResponse": "errorType=security&errorCode=000&status=403&message=Terminal%20is%20not%20allowed",
        "ErrorCondition": "NotAllowed"
      }
    },
    "MessageHeader": {
      "ProtocolVersion": "3.0",
      "SaleID": "John",
      "MessageClass": "Service",
      "MessageCategory": "Reversal",
      "ServiceID": "0309141944",
      "POIID": "MX925-289173817",
      "MessageType": "Response"
    }
  }
}
"ReversalResponse" : {
         "Response" : {
            "AdditionalResponse" : "At SaleToPOIRequest.ReversalRequest, field ReversedAmount: Field not supported",
            "Result" : "Success"
         },
         "POIData" : {
            "POITransactionID" : {
               "TimeStamp" : "2017-07-14T08:07:29.000Z",
               "TransactionID" : "9815000196503384"
            }
         }
      },
{
   "SaleToPOIResponse" : {
      "MessageHeader" : {
         "POIID" : "MX925-123456789",
         "ProtocolVersion" : "3.0",
         "MessageClass" : "Service",
         "SaleID" : "POSSystemID12345",
         "ServiceID" : "21736",
         "MessageCategory" : "Reversal",
         "MessageType" : "Response"
      },
      "ReversalResponse" : {
         "Response" : {
            "Result" : "Success"
         },
         "POIData" : {
            "POITransactionID" : {
               "TimeStamp" : "2017-07-19T08:15:20.000Z",
               "TransactionID" : "9815004521242734"
            }
         }
      }
   }
}