---
title: "Cancel or refund"
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/classic-integrations/modify-payments/cancel-or-refund"
source_url: "https://docs.adyen.com/online-payments/classic-integrations/modify-payments/cancel-or-refund.md"
canonical: "https://docs.adyen.com/online-payments/classic-integrations/modify-payments/cancel-or-refund"
last_modified: "2020-03-13T09:51:00+01:00"
language: "en"
---

# Cancel or refund

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

[View source](/online-payments/classic-integrations/modify-payments/cancel-or-refund.md)

If you want to return the funds to your shopper, but are not certain whether the payment has been [captured](/online-payments/classic-integrations/modify-payments/capture) or not, use the Cancel or Refund functionality. 

This will either: 

* [Cancel](/online-payments/classic-integrations/modify-payments/cancel) the payment – in case it has not yet been captured. 
* [Refund](/online-payments/classic-integrations/modify-payments/refund) the payment – in case it has already been captured.

If you have an Adyen for Platforms integration, note that the [/cancelOrRefund](https://docs.adyen.com/api-explorer/#/Payment/cancelOrRefund) endpoint does not accept [split instructions](/platforms/online-payments/split-transactions/split-refunds). If you want to provide instructions on how to split the refund, we recommend that you:

1. Check if the payment has been captured.
2. If not captured yet, make a [/payments/{paymentPspReference}/cancels](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/cancels) call. If already captured, make a [/payments/{paymentPspReference}/refunds](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/refunds) call.

Do not use the [/cancelOrRefund](https://docs.adyen.com/api-explorer/#/Payment/cancelOrRefund) endpoint for payments that involve [multiple partial captures](/online-payments/capture).

## Cancel or refund a payment

To issue a cancel or refund, make a request to the [/cancelOrRefund](https://docs.adyen.com/api-explorer/#/Payment/cancelOrRefund) endpoint. You need to specify: 

* `merchantAccount`: The name of your merchant account that is used to process the payment.
* `originalReference`: The original `pspReference` of the payment that you want to cancel or refund. This reference is returned in the response to your payment request, and in the AUTHORISATION webhook event.
* `reference`:

  Optional

  Specifies a unique identifier for payment modification. The `reference` field is useful to tag a partial cancel or refund for future reconciliation.

```json
{
    "merchantAccount" : "YourMerchantAccount",
    "originalReference" : "9313547924770610",
    "reference" : "YourModificationReference"
}
```

You will receive a `/cancelOrRefund` response containing: 

* `pspReference`: The PSP reference associated with this `/cancelOrRefund` request.

```json
{
    "pspReference" : "8863534564726784",
    "response" : "[cancelOrRefund-received]"
}
```

## CANCEL OR REFUND webhook

To know whether your request to cancel or refund the payment was successful, you need to receive CANCEL\_OR\_REFUND webhooks.

If you have enabled CANCEL\_OR\_REFUND webhooks, we will send you a [webhook event](/development-resources/webhooks) once  we have processed your request to cancel or refund the payment. This event contains:

| 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

* [API Explorer](https://docs.adyen.com/api-explorer/?classes=codeLabel#/Payment/cancelOrRefund)
* [Online payments webhook reference](https://docs.adyen.com/api-explorer/#/Webhooks)
* [Capture](/online-payments/classic-integrations/modify-payments/capture)
* [Cancel](/online-payments/classic-integrations/modify-payments/cancel)
* [Refund](/online-payments/classic-integrations/modify-payments/refund)
