Search

Are you looking for test card numbers?

Would you like to contact support?

Default icon

Reversal

Return the funds to the shopper when you are not sure whether the payment has been captured.

Use the /payments/{paymentPspReference}/reversals endpoint if you want to return the funds to your shopper, but are not certain whether the payment has been captured or not.

This will either: 

  • Cancel the payment – in case it has not yet been captured. 
  • Refund the payment – in case it has already been captured.

You get the outcome of the reversal request asynchronously, in a CANCEL_OR_REFUND webhook.

Do not use the /payments/{paymentPspReference}/reversals endpoint for payments that involve

Instead, check if the payment has been captured and make a corresponding /payments/{paymentPspReference}/refunds or /payments/{paymentPspReference}/cancels call.

Reverse a payment

Make a POST /payments/{paymentPspReference}/reversals request, where paymentPspReference is the pspReference of the payment that you want to reverse. You can find the pspReference in the AUTHORISATION webhook.

In your request, include:

  • merchantAccount: The name of your merchant account that is used to process the payment.
  • reference: You can optionally include a reference reversal request. The reference field is useful to tag a partial cancel or refund for reconciliation.
curl https://checkout-test.adyen.com/checkout/v67/payments/8836183819713023/reversals \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
    "reference": "YourReversalReference",
    "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}'

The /payments/{paymentPspReference}/reversals response includes a pspReference, Adyen's unique reference associated with this reversal request.

{
    "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
    "paymentPspReference": "8836183819713023",
    "pspReference" : "8863534564726784",
    "reference": "YourReversalReference",
    "status" : "received"
}

CANCEL_OR_REFUND webhook

You get the outcome of the reversal request asynchronously, in a CANCEL_OR_REFUND webhook that includes:

  • eventCodeCANCEL_OR_REFUND.
  • originalReference: The paymentPspReference.
  • pspReference: The pspReferencefrom the /payments/{paymentPspReference}/reversals response.
  • success: Indicates whether the request to reverse the payment was successful.

    • true: your request was successful. The  modification.action field in the  additionalData object contains information about whether the request produced a cancel or a refund. 
    • false: your request failed. The notification includes a reason field with a short description of the problem. Review the reason, fix the issue if possible, and resubmit the refund request.
 {
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "additionalData":{
               "modification.action":"refund"
            },
            "amount":{
               "currency":"EUR",
               "value":100
            },
            "eventCode":"CANCEL_OR_REFUND",
            "eventDate":"2018-09-20T14:29:09+02:00",
            "merchantAccountCode":"YourMerchantAccount",
            "originalReference":"8836183819713023",
            "paymentMethod":"visa",
            "pspReference":"8863534564726784",
            "reason":"",
            "success":"true"
         }
      }
   ]
}

For more information about the included fields, see the CANCEL_OR_REFUND notification reference.

See also