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.
When cancelling an authorization, the following sequence of steps takes place:
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.
DELETE /payments/v1/transactions/275494 HTTP/1.1
Host: api-test-aqount.finance.arvato.com
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
HTTP/1.1 200 OK
Content-Type: application/json
{
"paymentTransaction": {
"token": "275515",
"status": "Canceled",
"miscPspSpecificDetails": {
"pspOrderId": "O-20210802200756"
}
}
}