Cancel authorisation

An overview of the typical use case handling a cancelation of a previously authorized transaction.

Note: Can be used only for a succesful authorization before a capture has taken place.

In case a payment request has been executed handling the authorization and capture as 2 separate steps, you will have the possibility to cancel the previously authorized payment transaction as long as the capture operation has not yet been performed.

The cancellation of authorized transactions is an efficient instrument to manage situations such as an order not being executable because of the associated items out of stock or for whatever reason not deliverable. It allows you to avoid the more complex handling of a refund.

As this option is only available for payment requests processed with the authorization and capture as 2 separate steps, it is only applicable for card payments and wallet payments.

How it works

When cancelling an authorization, the following sequence of steps takes place:

  1. (Prerequisite) During checkout, customer selects payment method and provides all relevant payment information.
  2. (Prerequisite) Accounting as a Service checks and validates the information provided and provides merchant with the payment token representing the payment instrument ready for use.
  3. (Prerequisite) Merchant requests authorization based on the received payment token.
  4. (Prerequisite) Accounting as a Service handles the payment authorization request. If successfully executed, the merchant is provided with a confirmation of the execution.
  5. Merchant requests cancellation of the previously authorized payment transaction.
  6. Accounting as a Service processes the cancellation and provides the merchant with the result of the operation.
High-level process description
An overview using BPMN to describe the process flow
Checkout the BPMN illustration to get an overview of the process, including the various activities and participating main actors.

How to implement

Cancel authorization

To cancel an authorization, make a DEL /payments/{version}/transactions/{paymentTransactionToken} request, where {paymentTransactionToken} is the unique identifier of the transaction (i.e. the transaction token) as it has been returned as part of the response from the request to authorize of the original payment request.

For more information, please refer to the related endpoint description within the API Explorer.

Sample request
DELETE /payments/v1/transactions/275494 HTTP/1.1
Sample response
HTTP/1.1 200 OK
Content-Type: application/json

  "paymentTransaction": {
    "token": "275515",
    "status": "Canceled",
    "miscPspSpecificDetails": {
      "pspOrderId": "O-20210802200756"

See also