Cancel Order
If orders items should no longer be delivered to the end customer. Use this endpoint to cancel all remaining order items that has not yet been captured.
Please note
This can only be done on orders with status NotActivated
or PartActivated
or Expired
. This action is non-reversible.
Canceled order items should not be delivered to the customer and if it was a direct payment, the customer will be refunded the amount of the canceled rows.
- Request
- Response
POST /manage/orders/{{orderId}}/cancel HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
/* Optional body */
{
"actionReference": "test-cancelref-123"
}
Status: 202 Accepted
/* Headers */
Location: /manage/orders/1b1f5ef6-92n1-4b46-b1dc-ae2e00c4c315
/* No body */
Http status code | Description |
---|---|
202 | Order canceled |
401 | Unauthorized, token verification needed. See: Authentication for more information |
403 | Permissions needed e.g. trying to handle content for a store you don't have permission to |
404 | Order not found |
Data Model​
Request​
Request headers​
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Instructions on how to generate the Bearer token value can be found here |
Request body​
Property | Required | Explanation | Type | Notes |
---|---|---|---|---|
actionReference | No | A reference to this specific cancelation. | string | This will be visible in the order events and searchable in the Merchant Hub. |
Response​
The response will be 202 Accepted
for a successful cancel.
Please note
Due to the asynchronous nature of an Accepted status answer, it can take a few seconds before the update can be shown in various systems and responses to API requests. You should design your system to accomodate this.