Cancel an authorised payment

post/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.

Endpoint destination URL
https://checkout-test.adyen.com/v70/payments/{paymentPspReference}/cancels
Click to copy

Header Parameters

Idempotency-Keystring

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

Path Parameters

paymentPspReferencestringRequired

The pspReference of the payment that you want to cancel.

Request Parameters

applicationInfoobject

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

merchantAccountstringRequired

The merchant account that is used to process the payment.

referencestring

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

Response parameters

After submitting a call, you receive a response message to inform you that your request was received and processed.

Depending on the HTTP status code of the response message, it is helpful to build some logic to handle any errors that a request or the system may return.

HTTP Responses

  • 201 - Created

    The request has been fulfilled and has resulted in one or more new resources being created.

    Show moreShow less
  • 400 - Bad Request

    A problem reading or understanding the request.

    Show moreShow less
  • 401 - Unauthorized

    Authentication required.

    Show moreShow less
  • 403 - Forbidden

    Insufficient permissions to process the request.

    Show moreShow less
  • 422 - Unprocessable Entity

    A request validation error.

    Show moreShow less
  • 500 - Internal Server Error

    The server could not process the request.

    Show moreShow less