Checkout icon

Cancel

Learn to cancel a payment that has not been captured.

You can cancel a payment before you capture it, in the following scenario: if the payment was made with a payment method that allows you to capture it separately from authorization. When you cancel the payment, the financial institution releases the funds back to the shopper's bank account.

Requirements

Requirement Description
Integration type An online payments integration.
Customer Area roles Make sure that you have the following roles:
  • View Payments
  • Merchant manage payments
Webhooks Listen for webhook messages with the following eventCode values:
Limitations After a payment has been captured, you can no longer cancel it.

Ways to cancel a payment

After you determine that a payment has not been captured, you can cancel it in the following using one of the following:

Cancel a payment using the Customer Area

To cancel a payment in your Customer Area:

  1. Go to Transactions > Payments.
  2. Select the PSP reference of the payment that you want to cancel.
    This opens the Payment details page.
  3. Select Manage payment > Cancel payment. The Cancel payment button is available only if the payment has not been captured.
  4. Enter the confirmation code.
  5. Select Cancel payment.

Cancel a payment using the Checkout API

You can cancel a payment with the following information:

Cancel with PSP reference

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

  1. Get the PSP reference of the authorized payment you want to cancel. You can get it from your transaction list in Customer Area or the AUTHORISATION webhook for the payment.

  2. Make a /payments/{paymentPspReference}/cancels request including the following:

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

    If you do not know if the payment has been captured, use the /payments/{paymentPspReference}/reversals endpoint instead.

    The response includes the following:

    Parameter Description
    paymentPspReference The PSP reference of the payment you want to cancel.
    pspReference The unique reference for this request to cancel the payment.
  3. Get the outcome of the cancellation request in the CANCELLATION webhook.

Cancel with your reference

Canceling a payment using your reference is possible up to 24 hours after authorization.

We recommend that you only cancel using the reference if you generate a unique references for each payment request and do not have the pspReference available.

  1. Make a /cancels request including the following:

    Parameter Required Description
    paymentReference -white_check_mark- Your reference for the payment that you want to cancel. This is the reference that you included in the /payments or /sessions request for the original the payment.
    merchantAccount -white_check_mark- The name of your merchant account that is used to process the payment.
    reference Your reference for this cancel request.

    The response includes the following:

    Parameter Description
    paymentReference Your reference for the payment you want to cancel.
    pspReference The unique reference for this request to cancel the payment.
  2. Get the outcome of the cancellation request in the TECHNICAL_CANCEL webhook.

Webhooks for cancellations

The webhook that you get depends on if you made the cancel request with the PSP reference or with your own reference.

CANCELLATION webhook

If you made the cancel request with the PSP reference, you get the outcome of the cancel request in the CANCELLATION webhook. It contains the following:

  • eventCode: CANCELLATION.
  • originalReference: the PSP reference for the payment that you requested to cancel.
  • pspReference: the PSP reference for the cancel request. 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.

Reasons for an unsuccessful cancel request

When a cancel request fails, you receive a CANCELLATION webhook with success: false and the reason for the failure. The table below shows the most common reasons:

Reason Description
Insufficient balance on payment There is not enough remaining balance on your payment to process the cancel.

Note: The balance on the payment refers to the amount that remains from the original payment. For example, if a transaction has a total of EUR 10 and no refund or chargeback is processed, the balance on the payment is EUR 10. After a refund or chargeback of EUR 3 is processed, the remaining balance on the payment is EUR 7.

This transaction-specific balance is independent of, and not to be confused with, your merchant or company account balances.

Check the payment status in your Customer Area.
Transaction not found The cancel failed because:
  • The paymentReference is missing or incorrect.
  • You provided an incorrect merchantAccount.
Check that the paymentReference you provided is correct and linked to the right account.
Transaction is expired The authorization for this payment has expired. You can no longer cancel it.
Operation not available The cancel operation is not available for this payment.

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

TECHNICAL_CANCEL webhook

If you made the cancel request with your reference, you get the outcome of the request in the TECHNICAL_CANCEL webhook. It contains the following:

  • eventCodeTECHNICAL_CANCEL
  • pspReference: The PSP reference for the cancel request. This is the same as the pspReferencefrom the  /cancels response. 
  • originalReference: The PSP reference for the payment that you requested to cancel.
  • success: Indicates whether the cancel request was successful. 

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

See also