> ## Documentation Index
> Fetch the complete documentation index at: https://adyen-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel

> Cancel the authorisation on an uncaptured payment.

## Cancel in Customer Area

You can also cancel payments in your Customer Area. For more information, refer to [Manage payments](https://adyen-preview.mintlify.site/account/manage-payments.md#cancel-a-payment).

For some payment methods, the payment is completed in two steps:

1. [Authorisation](https://adyen-preview.mintlify.site/get-started-with-adyen/adyen-glossary.md#authorisation) – The payment details of the shopper are verified, and the funds are reserved.
2. [Capture](https://adyen-preview.mintlify.site/online-payments/classic-integrations/modify-payments/capture) –  The reserved funds are transferred from the shopper to your account. 

If you have authorised a payment but do not want to capture it, for example because an item is out of stock, you need to make a [/cancel](https://docs.adyen.com/api-explorer/Payment/cancel) request to release the funds back to the shopper. If the payment has already been captured, you need to [refund](https://adyen-preview.mintlify.site/online-payments/classic-integrations/modify-payments/refund.md) it instead.

If you want to cancel a payment but are not sure whether it has been [captured](https://adyen-preview.mintlify.site/online-payments/classic-integrations/modify-payments/capture), use the [`/cancelOrRefund` ](https://adyen-preview.mintlify.site/online-payments/classic-integrations/modify-payments/cancel-or-refund)endpoint instead.

In your call to the [/cancel](https://docs.adyen.com/api-explorer/Payment/cancel) endpoint, you need to specify the `pspReference` of the original payment. If you do not have this reference, for example because of a timeout error, you can use our [technical cancel](#technical-cancel) functionality.

## Cancel a payment

Make a POST request to the [/cancel](https://docs.adyen.com/api-explorer/Payment/cancel) endpoint, specifying: 

* `merchantAccount`: The name of your merchant account that is used to process the payment.
* `originalReference`: The `pspReference` of the original payment request. This is included in the response to your payment request, and in the AUTHORISATION webhook.
* `reference`: Optionally, you can specify your own reference for this [/cancel](https://docs.adyen.com/api-explorer/Payment/cancel) request.

```json theme={null}
{
    "merchantAccount" : "YOUR_MERCHANT_ACCOUNT",
    "originalReference" : "8313547924770610",
    "reference" : "YOUR_MODIFICATION_REFERENCE"
}
```

You will receive a `/cancel` response containing: 

* `response`: **\[cancel-received]**
* `pspReference`: The PSP reference associated with this `/cancel` request. This is different from the PSP reference associated with the original payment request. 

```json theme={null}
{
    "pspReference" : "8412534564722331",
    "response" : "[cancel-received]"
}
```

### CANCELLATION webhook

You receive the outcome of the cancel request asynchronously, in a [webhook](https://adyen-preview.mintlify.site/development-resources/webhooks.md) that includes :

* `eventCode`: **CANCELLATION**.

* `originalReference`: The PSP reference of the authorization.

* `pspReference`: The same as the `pspReference` in the [/payments/\{paymentPspReference}/cancels](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/cancels) response.

* `success`: Indicates whether the cancel request was successful. Possible values:

  * **true**: The cancel request was successful.
  * **false**: The cancel request failed. The webhook event includes a `reason` field with a short description of the problem. Review the reason, fix the issue if possible, and resubmit the cancel request.

> [tab] success: true
>
> ```json theme={null}
> {
>    "live":"false",
>    "notificationItems":[
>       {
>          "NotificationRequestItem":{
>             "amount":{
>                "currency":"EUR",
>                "value":500
>             },
>             "eventCode":"CANCELLATION",
>             "eventDate":"2021-03-05T09:08:05+01:00",
>             "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
>             "originalReference":"XB7XNCQ8HXSKGK82",
>             "paymentMethod":"mc",
>             "pspReference":"JDD6LKT8MBLZNN84",
>             "reason":"",
>             "success":"true"
>          }
>       }
>    ]
> }
> ```

> [tab] success: false
>
> ```json theme={null}
> {
>    "live":"false",
>    "notificationItems":[
>       {
>          "NotificationRequestItem":{
>             "amount":{
>                "currency":"EUR",
>                "value":500
>             },
>             "eventCode":"CANCELLATION",
>             "eventDate":"2021-03-05T09:08:05+01:00",
>             "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
>             "originalReference":"XB7XNCQ8HXSKGK82",
>             "paymentMethod":"mc",
>             "pspReference":"JDD6LKT8MBLZNN84",
>             "reason":"Transaction not found",
>             "success":"false"
>          }
>       }
>    ]
> }
> ```
>
> For more information about the included fields, see the [CANCELLATION](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CANCELLATION) webhook reference.
>
> ## Technical cancel
>
> The [/technicalCancel](https://docs.adyen.com/api-explorer/Payment/technicalCancel) endpoint allows you to cancel a payment by using the `reference` that you specified in the original payment request. Technical cancel is only valid for 24 hours after authorisation.
>
> Only use technical cancel if:
>
> 1. You do not have the `pspReference` of the original payment available, for example because of a timeout error.
> 2. You are using *unique* references for payment requests.
>
> In your call to the [/technicalCancel](https://docs.adyen.com/api-explorer/Payment/technicalCancel) endpoint, specify:
>
> * `merchantAccount`: The name of your merchant account that is used to process the payment.
> * `originalMerchantReference`: Your `reference` from the original payment request.
> * `reference`: Optionally, you can specify your own reference for this [/technicalCancel](https://docs.adyen.com/api-explorer/Payment/technicalCancel) request.
>
> ```json theme={null}
> {
>   "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
>   "originalMerchantReference": "YOUR_ORIGINAL_REFERENCE",
>   "reference": "YOUR_MODIFICATION_REFERENCE"
> }
> ```
>
> You will receive a `/technicalCancel` response containing: 
>
> * `pspReference`: The PSP reference associated with this `/technicalCancel` request. Note that this is different from the PSP reference associated with the original payment request.  
>
> ```json theme={null}
> {
>    "pspReference":"8515208516304269",
>    "response":"[technical-cancel-received]"
> }
> ```
>
> ### TECHNICAL CANCEL webhook
>
> Once we have processed your cancel request, we send you a [webhook event](https://adyen-preview.mintlify.site/development-resources/webhooks.md) with:
>
> * `eventCode`: **TECHNICAL\_CANCEL**
> * `pspReference`: Same as the `pspReference` in the `/technicalCancel` response. 
> * `success`: Indicates whether the cancel request was successful. 
>
> ```json theme={null}
> {
>    "live":"false",
>    "notificationItems":[
>       {
>          "NotificationRequestItem":{
>             "additionalData":{
>                "paymentMethodVariant":"visa"
>             },
>             "amount":{
>                "currency":"EUR",
>                "value":5000
>             },
>             "eventCode":"TECHNICAL_CANCEL",
>             "eventDate":"2018-07-18T22:35:14+02:00",
>             "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
>             "merchantReference":"YOUR_ORIGINAL_REFERENCE",
>             "originalReference":"8313547924770610",
>             "paymentMethod":"visa",
>             "pspReference":"8515208516304269",
>             "reason":"",
>             "success":"true"
>          }
>       }
>    ]
> }
> ```
>
> For more information about the included fields, see the [TECHNICAL\_CANCEL](https://docs.adyen.com/api-explorer/Webhooks/latest/post/TECHNICAL_CANCEL) webhook reference.
>
> ## See also
>
> * [API Explorer](https://docs.adyen.com/api-explorer/Payment/cancel?classes=codeLabel)
> * [Online payments webhook reference](https://docs.adyen.com/api-explorer/Webhooks)
> * [Capture](https://adyen-preview.mintlify.site/online-payments/classic-integrations/modify-payments/capture)
> * [Cancel or refund](https://adyen-preview.mintlify.site/online-payments/classic-integrations/modify-payments/cancel-or-refund.md)
> * [Payments lifecycle](https://adyen-preview.mintlify.site/account/payments-lifecycle.md)
> * [Payment methods](https://adyen-preview.mintlify.site/payment-methods)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.