---
title: "Reversal"
description: "Return the funds to the shopper when you are not sure whether the payment has been captured."
url: "https://docs.adyen.com/online-payments/reversal"
source_url: "https://docs.adyen.com/online-payments/reversal.md"
canonical: "https://docs.adyen.com/online-payments/reversal"
last_modified: "2020-03-13T09:51:00+01:00"
language: "en"
---

# Reversal

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

[View source](/online-payments/reversal.md)

If you are not sure if a payment has been [captured](/online-payments/capture), you can use a reversal to return the funds to the shopper.

A reversal does one of the following:

* If the payment has not been captured, it [cancels](/online-payments/cancel) the payment.
* If the payment has been captured, it [refunds](/online-payments/refund) the payment.

## Requirements

| Requirement                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Integration type**                            | An [online payments integration](/online-payments/build-your-integration/).                                                                                                                                                                                                                                                                                                                                                                                               |
| **[Customer Area roles](/account/user-roles)**  | To edit capture settings, make sure that you have the following roles:- **Merchant admin**
- **View Payments**
- **Merchant manage payments**                                                                                                                                                                                                                                                                                                                             |
| **[Webhooks](/development-resources/webhooks)** | Listen for webhook messages with the following `eventCode` value:- [**CANCEL\_OR\_REFUND**](/development-resources/webhooks/webhook-types#transaction-events)                                                                                                                                                                                                                                                                                                             |
| **Limitations**                                 | You cannot use a reversal for the following cases:- If you have made [multiple partial captures](/online-payments/capture) for the payment.
- When the payment includes [split data](/classic-platforms/processing-payments#providing-split-instructions) in the payment request or in the capture request for Adyen for Platforms.In these cases, check if the payment has been captured, and [cancel](/online-payments/cancel) or [refund](/online-payments/refund) it. |

## Reverse a payment

Make a POST  [/payments/{paymentPspReference}/reversals](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/reversals) request, including the following:

| Parameter                            | Required                                                                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------ | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `paymentPspReference` Path parameter | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The PSP reference of the payment. You can find this in the following:- The webhook message with `eventCode`: **AUTHORISATION** for the payment.
- In your [Customer Area](https://ca-test.adyen.com/), in the list of payments (**Transactions** > **Payments**).
- If you made a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request for the payment, the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response. |
| `merchantAccount`                    | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your merchant account used to process the payment.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `reference`                          |                                                                                             | Your reference for the reversal request. For reconciliation, this can be useful to identify a partial cancel or refund.                                                                                                                                                                                                                                                                                                                                                                |

**Example of a reversal request**

#### curl

```bash
curl https://checkout-test.adyen.com/v72/payments/VK9DRSLLRCQ2WN82/reversals \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
    "merchantAccount": "ADYEN_MERCHANT_ACCOUNT",
    "reference": "YOUR_UNIQUE_REFERENCE"
}'
```

#### Java

```java
Client client = new Client(System.getenv("API_KEY"), Environment.TEST);
ModificationsApi checkout = new ModificationsApi(client);
PaymentReversalRequest paymentReversalRequest = new PaymentReversalRequest();
paymentReversalRequest.setMerchantAccount(System.getenv("MERCHANT_ACCOUNT"));
paymentReversalRequest.setReference("YOUR_UNIQUE_REFERENCE");
String paymentPspReference = "VK9DRSLLRCQ2WN82";
PaymentReversalResponse response = checkout.refundOrCancelPayment(paymentPspReference, paymentReversalRequest);
```

The [/payments/{paymentPspReference}/reversals](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/reversals)  response includes a `pspReference`, Adyen's unique reference associated with this reversal request.

```json
{
    "merchantAccount": "ADYEN_MERCHANT_ACCOUNT",
    "paymentPspReference": "VK9DRSLLRCQ2WN82",
    "pspReference" : "TF995R5G6L2GWR82",
    "reference": "YOUR_UNIQUE_REFERENCE",
    "status" : "received"
}
```

## CANCEL\_OR\_REFUND webhook

You receive the outcome of the reversal request asynchronously, in a [webhook](/development-resources/webhooks) message that includes the following:

| Parameter           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------- |   |
| `eventCode`         | **CANCEL\_OR\_REFUND**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `originalReference` | The PSP reference of the original payment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `pspReference`      | The PSP reference of the reversal that you can find in the [/payments/{paymentPspReference}/reversals](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/reversals) response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `success`           | Indicates the outcome of the refund validations. Possible values:- **true**: Adyen's validations were successful and we sent the refund request to the card scheme. This usually means that the refund will be processed successfully. However, in rare cases the refund can be rejected by the card scheme, or reversed. For information about these exceptions, see [**REFUND\_FAILED** webhook](/online-payments/refund#refund-failed), and [**REFUNDED\_REVERSED** webhook](/online-payments/refund#refunded-reversed).
- **false**: the refund validations failed. The webhook includes a `reason` field with a short description of the problem. [Review the reason](/online-payments/classic-integrations/modify-payments/refund#unsuccessful-refund-request), fix the issue if possible, and resubmit the refund request. |

**Example of a webhook message with the CANCEL\_OR\_REFUND event code**

```json
{
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "additionalData":{
               "modification.action": "refund"
            },
            "amount":{
               "currency": "EUR",
               "value": 1025
            },
            "eventCode":"CANCEL_OR_REFUND",
            "eventDate":"2022-02-03T15:14:15.004Z",
            "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
            "originalReference":"VK9DRSLLRCQ2WN82",
            "paymentMethod":"mc",
            "pspReference":"TF995R5G6L2GWR82",
            "reason":"",
            "success":"true"
         }
      }
   ]
}
```

For more information about the included fields, see the [CANCEL\_OR\_REFUND](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CANCEL_OR_REFUND) webhook reference.

## See also

* [Online payments webhook reference](https://docs.adyen.com/api-explorer/#/Webhooks/latest/overview)
* [Capture](/online-payments/capture)
* [Cancel](/online-payments/cancel)
* [Refund](/online-payments/refund)
