Skip to main content
View as Markdown

Cancel an order and refund its payments

POST 

/orders/:orderId/cancellations

Cancels the given quantities of one or more order items, or the whole order with cancelWholeOrder: true, and with refundPayments: true refunds the payments of what you cancel. A payment is refunded in full: a captured payment is refunded for what is left of it, and one not captured yet is voided. So a payment is refunded only when nothing it paid for is left to ship and none of it has shipped; a request that would leave part of a payment is refused. Refunds are made with your own permissions, so your role must be allowed to refund payments. If your fulfillment provider already has the order (externalOrderId is set), only the whole order can be cancelled: the provider is asked to cancel it first, and the order is cancelled and refunded only if the provider confirms. If it cannot cancel it, for example because it has shipped, nothing changes and the response says why. If a refund fails before anything is cancelled, nothing is cancelled. With refundPayments: false the order is cancelled as by POST /orders/{orderId}/cancel, and nobody is refunded.

Request​

Responses​