Logo
Adyen APIs API Documentation

Cancel payment using a PSP reference

POST {{baseUrl}}/payments/:paymentPspReference/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 CANCELLATION webhook. If you want to cancel a payment but don't have the pspReference, use the /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.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string
Idempotency-Key
null A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).




RESPONSES

status Created

{ "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentPspReference": "993617894903480A", "reference": "YOUR_UNIQUE_REFERENCE", "pspReference": "993617894906488A", "status": "received" }


Curl
curl -X POST 'https://checkout-test.adyen.com/v71/payments/:paymentPspReference/cancels' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Idempotency-Key: ' -d '{"reference":"YOUR_UNIQUE_REFERENCE","merchantAccount":""}'

ENDPOINTS