riverty logo

Docs

Get Started Login

Void Authorization

See the detailed API Reference for more information.

Why Void Authorization Is Important

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 handle these situations.

Voids can also be performed (either fully or partially) using the Cancel function in the Merchant Portal.

Example Scenario

The merchant did not ship the socks Astrid ordered. Initially, they expected the item to be restocked soon, but the supplier has since discontinued that particular style. The merchant emails Astrid to explain the situation and offer an apology.

Fortunately, the socks had not yet been captured, so there is no need to issue a refund. Instead, the merchant simply sends a Void Authorization call for the unavailable item. This ensures that Astrid will not receive an invoice for the socks at all.

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, along with detailed information about each item being canceled—using the same format as in the original Authorize call.

Response Fields

  • TotalCapturedAmount – The total amount captured on the order up to this point.
  • TotalAuthorizedAmount – The full order value as originally submitted in the Authorize call.

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
 }
}
    

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?