Partial Void

This use-case describes partially voiding an order. This can be useful when the order is authorized, not yet captured and some items in the order have to be cancelled.

Step 0 - Preconditions

  • One-Step Authorize
  • Order partly sold out
  • Partial Void

We have a customer named John. He is shopping the web for two black tablets and one black music player.

Step 1 - John waiting for order

John has either done a One-Step or Two-Step Authorize, and is waiting for his two black tablets and one black music player to be shipped.


Step 2 - Order cannot be fulfilled

The merchant discovers that the black music player is actually sold out. He contacts John, apologizes, and they agree to cancel the music player in the order.

To do that, the merchant creates a VoidAuthorizationRequest with only the order items, which are to be voided. Then, sends John's order number to the Voids endpoint.

NOTE! The endpoint Voids has to be called with John's order number in the url.
Resource URL: /api/v3/orders/{number}/voids

Important variables in this request


This is the total gross amount of the cancelled items.


The Items object must be defined, and contain only the items which are voided.

For more detailed information about this request, visit the Payment's API Documentation.

  "cancellationDetails": {
    "totalGrossAmount": 200.00,
    "currency": "EUR",
    "imageUrl": "",
    "items": [
        "productId": "2",
        "groupId": "002",
        "description": "MusicPlayer Black",
        "grossUnitPrice": 200.00,
        "quantity": 1.0,
        "productUrl": ""

Step 3 - AfterPay's response

AfterPay processes the partial void and if the data is correct, responds with 200 "OK".

NOTE! If the response is not successful, here are common error codes.

  "totalAuthorizedAmount": 1000.00