Search docs

Are you looking for test card numbers?

Would you like to contact support?

Start searching Adyen's documentation...

  Documentation

Cancel a refund

Learn how to cancel a refund request before it has been completed.

In some cases, for example returned gifts, you might need to refund a payment that cannot be tied to an original transaction. In this scenario, you can refund to a card that is presented on the payment terminal.  

If you want to perform some additional checks to ensure that the cardholder is eligible for the refund, you can set a delay for the refund request to be completed. 

To set up delayed POS refund requests, contact our POS Support Team.

The /voidPendingRefund endpoint allows you to cancel the refund request before it has been completed.

In your call to the /voidPendingRefund endpoint, you can refer to the original refund request either by using the tenderReference, or the pspReference. We recommend implementing based on the tenderReference, as this is generated for both offline and online transactions.

If you have not set up delayed POS refund requests, or if the configured refund delay has expired, it is not possible to cancel the refund anymore.

Cancel with tender reference

Make a call to the /voidPendingRefund, specifying:

  • merchantAccount: Your merchant account that was used to process the original refund request. 

  • tenderReference:  The transaction reference provided by the terminal that processed the refund request .

  • uniqueTerminalId: Unique ID of the terminal that processed the refund request.
{
    "merchantAccount" : "YourMerchantAccount",      
    "tenderReference" : "5Iw8001176969533005",
    "uniqueTerminalId" : "VX820-123456789"
}

You will receive a /voidPendingRefund response containing: 

  • pspReference: The PSP reference associated with this /voidPendingRefund request.
{
   "pspReference":"8815450600449645",
   "response":"[voidPendingRefund-received]"
}

Cancel with PSP reference

Alternatively, if you have the pspReference of the original refund request, you can specify this in your call to the /voidPendingRefund endpoint:

  • originalReference: The pspReference of the original refund request.
{   
    "merchantAccount" : "YourMerchantAccount",      
    "originalReference" : "9914748988390044"
} 

You will receive a /voidPendingRefund response containing: 

  • pspReference: The PSP reference associated with this /voidPendingRefund request.
{
   "pspReference":"8815450600449645",
   "response":"[voidPendingRefund-received]"
}

Notifications

Once we have processed your request to cancel the refund, we will send you a notification with:

  • eventCodeVOID_PENDING_REFUND
  • success: Indicates whether the request to cancel the refund was successful. 
{
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "amount":{
               "currency":"EUR",
               "value":1100
            },
            "eventCode":"VOID_PENDING_REFUND",
            "eventDate":"2018-11-28T18:03:50+01:00",
            "merchantAccountCode":"YourMerchantAccount",
            "merchantReference":"23418657",
            "originalReference":"9914748988390044",
            "pspReference":"8815434246295240",
            "reason":"",
            "success":"true"
         }
      }
   ]
}

See also