No momento, esta página não está disponível em português
Point-of-sale icon

Cancel

Void the authorization on a payment that has not been captured yet.

Cancel in Customer Area

You can also cancel payments in your Customer Area. For more information, see Manage payments.

If you want to revert a payment, you can cancel the authorization. This is possible while the authorization hasn't been captured yet: the payment is in the AuthorisedPending state, or in the Authorised state.

If the authorization has already been captured, you cannot cancel the payment anymore. You'll have to issue a refund instead.

To specify the payment that you want to cancel, use the pspReference of the authorization. You can find the pspReference in the hosttohostpaymentgateway/v#/payments response and in the AUTHORISATION webhook.

Cancel an authorization

To cancel a payment that has been authorized but not captured yet:

  1. From the authorization response or the AUTHORISATION webhook, get the pspReference of the authorization you want to cancel.

  2. Make a POST request to the /payments/{paymentPspReference}/cancels endpoint, where paymentPspReference is the PSP reference of the authorization you want to cancel.

    If you are not sure whether the authorization has been captured, use the /payments/{paymentPspReference}/reversals endpoint instead.

    In your request, include:

    Parameter Required Description
    merchantAccount -white_check_mark- The name of your merchant account that is used to process the payment.
    reference Your reference for the cancel request.

    The following example shows how to cancel an authorization that has the pspReference XB7XNCQ8HXSKGK82.

  3. When you receive the /payments/{paymentPspReference}/cancels response, note:

    • paymentPspReference: the PSP reference of the authorization you want to cancel.
    • pspReference: Adyen's unique reference associated with this cancel request.
    {
        "merchantAccount": "ADYEN_MERCHANT_ACCOUNT",
        "paymentPspReference": "XB7XNCQ8HXSKGK82",
        "pspReference" : "JDD6LKT8MBLZNN84",
        "reference": "YOUR_UNIQUE_REFERENCE",
        "status" : "received"
    }
  4. Wait for the CANCELLATION webhook to learn the outcome of the cancel request.

CANCELLATION webhook

You receive the outcome of the cancel request asynchronously, in a webhook that includes :

  • eventCode: CANCELLATION.
  • originalReference: The PSP reference of the authorization.
  • pspReference: The same as the pspReference in the /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.

For more information about the included fields, see the CANCELLATION webhook reference.

See also