Riverty Logo


Please select your page


Void/Cancel the Order

Based on the example of the API Walkthrough and Partial Capture, let’s take a common scenario:

The merchant has not shipped the socks that Astrid bought. He thought that he would get them in stock soon, but as it turns out, his supplier has stopped producing them. He sends an email to Astrid to apologize.

Fortunately, since he did not Capture the socks yet, Astrid does not have to pay anything or wait for a refund.

The merchant sends a Void / Cancellation call for the unavailable item. 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).

The response contains the following information:

  • Total Captured Amount – the sum of all Captures on this order so far.
  • Total Authorized Amount – the full order value, as originally submitted during the Authorize call.

See the detailed API documentation for more information.

Frequently asked questions

Do I need to specify the items?

If you want to cancel the full order or just cancel everything left after one or multiple captures have been made, you don't need to specify the items. You can send a void with an empty body and the remaining authorized amount will be cancelled.


   "cancellationDetails": {
      "totalGrossAmount": 1000,
      "items": [
            "productId": "0001-BLK-S",
            "description": "Leather jacket, Black, size S",
            "grossUnitPrice": 1000,
            "quantity": 1,
            "vatPercent": 20,
            "imageUrl": "https://developer-sandbox.riverty.com/images/black_leather_jacket.jpg",
            "lineNumber": 1


   "TotalCapturedAmount": 0,
   "TotalAuthorizedAmount": 2085
Riverty 2023