Terminal-2 icon

Cancel an unreferenced refund

Learn how to cancel an unreferenced refund request before it is completed.

If you are making unreferenced refunds, you may want to check that the cardholder is eligible for the refund. In this case, you can set a delay for the refund. This gives you time to make a /voidPendingRefund request to cancel a refund before it is completed.

This delay only applies to unreferenced refunds. It is not possible to cancel a referenced refund.

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

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

Set up delayed refunds

  1. Contact our Support Team to set up delayed POS refund requests.
  2. Set up webhooks. The result of the cancel request is provided asynchronously. We inform you of the outcome in a webhook.
  3. Generate an API key. To cancel unreferenced refunds from a POS app, you need to have an API key.

    If you are using cloud-based communications, you can use the existing API key that you use for Terminal API requests.

Cancel with tender reference

  1. Make a POST request to the /voidPendingRefund endpoint, specifying:

    • The request header with:

      Parameter Description
      content-type application/json
      x-api-key Your API key.
    • The request body with:

      Parameter Description
      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" : "ADYEN_MERCHANT_ACCOUNT",
        "tenderReference" : "ItS6001643972069002",
        "uniqueTerminalId" : "V400m-324688179"
    }
  2. In the /voidPendingRefund response, note the following:

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

Cancel with PSP reference

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

  1. Make a POST request to the /voidPendingRefund endpoint, specifying:

    • The request header with:

      Parameter Description
      content-type application/json
      x-api-key Your API key.
    • The request body with:

      Parameter Description
      merchantAccount Your merchant account that was used to process the original refund request.
      originalReference The pspReference of the original refund request.
    {
        "originalReference" : "ZC4R4RBFJGXXGN82",
        "merchantAccount" : "ADYEN_MERCHANT_ACCOUNT",
    }
  2. In the /voidPendingRefund response, note the following:

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

Webhooks

After we process your request to cancel the refund, we send you a webhook with:

  • eventCode: VOID_PENDING_REFUND.
  • success: Indicates if the request to cancel the refund was successful.
{
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "amount":{
               "currency":"EUR",
               "value":1100
            },
            "eventCode":"VOID_PENDING_REFUND",
            "eventDate":"2022-11-28T18:03:50+01:00",
            "merchantAccountCode":"ADYEN_MERCHANT_ACCOUNT",
            "merchantReference":"YOUR_REFERENCE",
            "originalReference":"ZC4R4RBFJGXXGN82",
            "pspReference":"KHQC5N7G84BLNK43",
            "reason":"",
            "success":"true"
         }
      }
   ]
}

See also