CheckoutModifications

Cancel an authorised payment

POST
/cancels

Cancels the authorisation on a payment that has not yet been captured, and returns a unique reference for this request. You get the outcome of the request asynchronously, in a TECHNICAL_CANCEL webhook.

If you want to cancel a payment using the pspReference, use the /payments/{paymentPspReference}/cancels endpoint instead.

If you want to cancel a payment but are not sure whether it has been captured, use the /payments/{paymentPspReference}/reversals endpoint instead.

For more information, refer to Cancel.

Authorization

AuthorizationBasic <token>

In: header

Header Parameters

Idempotency-Key?string

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request Body

application/json

applicationInfo?

Information about your application. For more details, see Building Adyen solutions.

enhancedSchemeData?
merchantAccount*string

The merchant account that is used to process the payment.

paymentReference*string

The reference of the payment that you want to cancel.

reference?string

Your reference for the cancel request. Maximum length: 80 characters.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/cancels" \  -H "Idempotency-Key: 37ca9c97-d1d1-4c62-89e8-706891a563ed" \  -H "Content-Type: application/json" \  -d '{    "paymentReference": "YOUR_UNIQUE_REFERENCE_FOR_THE_PAYMENT",    "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_CANCELLATION",    "merchantAccount": "YOUR_MERCHANT_ACCOUNT"  }'

Example response when a payment cancellation was requested

{  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",  "paymentReference": "YOUR_UNIQUE_REFERENCE_FOR_THE_PAYMENT",  "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_CANCELLATION",  "pspReference": "993617894906488A",  "status": "received"}