See the detailed API documentation for more information.
Occasionally, a transaction will not go to plan and the order has to be voided. The Void Authorization call manages these situations. Orders can also be voided (or partially voided) via the "Cancel" function in the Merchant Portal.
The merchant has not ship the socks that Astrid ordered. The merchant thought that they would get them in stock soon, but as it turns out, the supplier has stopped producing this particular style of socks. The merchant sends an email to Astrid explaining the situation and apologizing.
Fortunately, the merchant did not Capture the socks yet, so Astrid does not have to wait for a refund. Instead, the merchant sends a Void Authorization call for the unavailable socks, so Astrid never receives an invoice for the socks.
This is a POST call to the VOIDS endpoint of the Riverty eCommerce API. It contains the total price of all the items being cancelled, and the individual item details (same format as in the Authorize call).
{
"cancellationDetails": {
"totalGrossAmount": 50,
"totalNetAmount": 42,
"items": [
{
"productId": "5745-GRY-M",
"description": "Socks, Grey, Size M",
"grossUnitPrice": 10,
"netUnitPrice": 8.4,
"quantity": 5,
"vatPercent": 19,
"vatAmount": 1.6,
"imageUrl": "https://developer-sandbox.riverty.com/images/grey_socks.jpg"
}
]
}
}
{
"TotalCapturedAmount": 0,
"TotalAuthorizedAmount": 185
}
If you want to cancel the full order or just cancel everything left after one or multiple captures have been made, you do not need to specify the items. You can send a void with an empty body and the remaining authorized amount will be cancelled.