MenuPlease select your page
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 AfterPay 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.