Transaction Reversal
Transaction Reversal can only be performed when a transaction has been completed as an authorisation only and is in an AUTH
state. In this state the funds have been reserved but not yet sent for settlement. Any attempts to perform settlement on a transaction not in this state will be rejected.
The Transaction Reversal function is a companion to the Transaction Settlement request, in that it is also used for merchants who wish to manage their transactions as a two-step process. Where the Transaction Settlement request allows the merchant to complete the transaction and claim the funds the Transaction Reversal request allows the merchant to cancel the authorisation in place and return the available balance to the consumers card.
This is most likely to be used in scenarios where the merchant has discovered that they are unable to fulfil the order as planned, for example when items ordered have gone permanently out of stock.
Authorisation codes issued but not charged/settled will automatically expire but it is best practice to reverse where possible - thus giving the consumer back the amount into their available balance sooner.
Transaction Reversal Request
Method | POST |
Transaction Reversal | |||
---|---|---|---|
Field Name | State | Data Type | Description |
id | Mandatory | String | Id of the transaction that needs to be charged/sent for settlement. |
Example Reversal Request
Accept: application/json
Content-Type: application/json
Authorization: Bearer 7KlGv*jFigCc3eReLY1h0yI8O31ZgqITFqyUH6om5w=Vjan=SYnUgeiLQp*_b-c3
{
"id": "6fce7714-6109-40d8-b408-0c6700509b6a"
}
Transaction Reversal Response
Transaction Settlement | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Field Name | Data Type | Description | ||||||||
accountId | String | Unique reference for the store processing the transaction. | ||||||||
amount | Decimal | Total amount of the original order/authorisation including decimal places where applicable. | ||||||||
currency | String | Currency of the transaction.
| ||||||||
id | String | Unique transaction ID. | ||||||||
invoiceId | String | Order/invoice/transaction/basket number generated by the host website, as passed in the request. | ||||||||
message | String | Message confirming the processing result of the transaction request. | ||||||||
payoutAmount | Decimal | Confirmation of the reversal amount. | ||||||||
success | Boolean | Confirmation of the reversal result.
| ||||||||
transactionState | String | The current state of the transaction.
|
Upon receipt of the Transaction Reversal request Checkout will attempt to perform a reversal with the merchant’s acquirer. Whilst these are often successful, there is a chance that the reversal cannot be completed for specific transactions. This is something that is beyond our control.
Examples Responses
- Successful Response
- Unsuccessful Response
{
"accountId": "uuid000001",
"amount": 10.00,
"currency": "GBP",
"id": "6fce7714-6109-40d8-b408-0c6700509b6a",
"invoiceId": "1589804887471",
"message": "Successfully Cancelled",
"payoutAmount": 10.00,
"success": true,
"state": "CANCEL"
}
{
"code": 2068,
"message": “Requested amount is not valid”,
"success": false
}