Skip to main content

Cancel order

When order items should no longer be delivered to the end customer, use this endpoint to cancel every remaining item that has not yet been captured.

Canceling cannot be undone

Once you cancel, the remaining items are released for good. There is no way to bring them back, so check the order before you call this.

Canceled items should not be delivered to the customer. If the order used a direct payment method, the customer is refunded the amount of the canceled rows.

Works on NotActivated, PartActivated, and Expired orders

Captured items are unaffected. See Order lifecycle for what each status allows.

POST /manage/orders/{{orderId}}/cancel HTTP/1.1
Host: api.uat.walleydev.com // Test environment. Production uses a different hostname.
Authorization: Bearer {{accessToken}}
Content-Type: application/json

/* Optional body */
{
"actionReference": "test-cancelref-123"
}
Http status codeDescription
202Cancel accepted
401Token missing, expired, or invalid
403No permission for this store, or the order has not finished syncing
404Order not found, or the order has not finished syncing
409A request with the same idempotency key is already in progress

See Errors for what to do about each of these.

Data Model​

Request​

Request headers​

HeaderRequiredExplanation
AuthorizationYesSee Authentication for how to generate the Bearer token value

Request body​

PropertyRequiredExplanationTypeNotes
actionReferenceNoA reference to this specific cancellation.stringThis will be visible in the order events and searchable in the Merchant Hub. Maximum 255 characters.

Response​

A successful cancel answers 202 Accepted with an empty body and a Location header pointing at the order.

The cancel is not live yet

202 means Walley accepted the request, not that it has been applied. Reading the order back right away usually returns the old version. See Asynchronous operations for how to read the result and retry safely.