Void Authorization
See the detailed API Reference for more information.
Why Void Authorization Matters
Sometimes, a transaction doesn’t go as planned and the order - or part of it - needs to be canceled. The Void Authorization call is designed to manage these cases.
Voids can also be performed - either fully or partially - using the Cancel function in the Merchant Portal.
Example Scenario
Astrid ordered socks along with other items. The merchant originally expected the socks to be restocked soon, but later learned that the supplier discontinued the product. The merchant informs Astrid via email and apologizes.
Since the socks were never captured, there is no need for a refund. Instead, the merchant sends a Void Authorization call for the unavailable item. This ensures Astrid never receives an invoice for the socks.
The Void Authorization is a POST request to the voids
endpoint of the Riverty eCommerce API. The request must include:
- The total amount to be voided.
- Detailed information for each canceled item, in the same format as the original Authorize call.
Response Fields
- TotalCapturedAmount – The total amount captured for the order so far.
- TotalAuthorizedAmount – The full order value originally submitted in the Authorize call.
Example Request
{
"cancellationDetails": {
"items": [
{
"imageUrl": "https://developer-sandbox.riverty.com/images/grey_socks.jpg",
"quantity": 5,
"productId": "5745-GRY-M",
"vatAmount": 1.6,
"vatPercent": 19,
"description": "Socks, Grey, Size M",
"netUnitPrice": 8.4,
"grossUnitPrice": 10
}
],
"totalNetAmount": 42,
"totalGrossAmount": 50
}
}
Example Response
{
"TotalCapturedAmount": 0,
"TotalAuthorizedAmount": 185
}
FAQ
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.
Do you find this page helpful?