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 Any online payments integration.
Customer Area roles Make sure that you have the following roles:
  • View Payments
  • Merchant manage payments
Webhooks Listen to the following webhooks:
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 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.

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