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 check before you make a /voidPendingRefund
request to cancel a refund before it is completed.
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.
Requirements
Requirement | Description |
---|---|
Integration type | A Terminal API integration with payment terminals or with a Mobile solution. |
API credentials | An API key to cancel unreferenced refunds from a POS app. If you are using cloud-based communications, you can use the existing API key that you use for Terminal API requests. |
Webhooks | Set up standard webhooks to be informed about the outcome of the cancellation of a refund. |
Limitations | Take into account the following limitations:
|
Setup steps | Before you begin, contact our Support Team to set up delayed POS refund requests. |
Cancel with tender reference
-
Make a POST /voidPendingRefund request, specifying:
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. curl -X POST \ https://pal-test.adyen.com/pal/servlet/Payment/v68/voidPendingRefund \ -H 'content-type: application/json' \ -H 'x-api-key: YOUR_API_KEY' \ -d '{"merchantAccount":"YOUR_MERCHANT_ACCOUNT","tenderReference":"5Iw8001176969533005","uniqueTerminalId":"VX820-123456789"}'
-
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:
-
Make a POST /voidPendingRefund request, specifying:
Parameter Description merchantAccount
Your merchant account that was used to process the original refund request. originalReference
The pspReference
of the original refund request.curl -X POST \ https://pal-test.adyen.com/pal/servlet/Payment/v68/voidPendingRefund \ -H 'content-type: application/json' \ -H 'x-api-key: YOUR_API_KEY' \ -d '{"merchantAccount":"YOUR_MERCHANT_ACCOUNT","originalReference":"9914748988390044"}'
-
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"
}
}
]
}