Cancel order
Requires an active API credential with the orders:create permission.
Cancels any order in the store that is not final (processing, action_required, or failed) while no fulfillment attempt or provider request is running and no shipment has left. Looking an order up by merchant_order_ref only finds orders created through the API. Repeating a cancellation that succeeded returns 200 again; an order canceled another way returns 409 with order_already_terminal.
A 409 order_not_cancelable response means the order is not eligible and includes a machine-readable details.reason_code.
Sandbox credentials receive a forbidden response because sandbox orders are stateless.
https://cardzone.ai/api/b2b/v1/orders/{id}/cancelAuthorization
Path parameters
Returns
200
Order canceled
- statusprocessingorfulfilledoraction_requiredorfailedorcanceledrequired
processing: accepted or still fulfilling.fulfilled: successful; safe to mark the partner order successful.action_required: inspectactionsand take the required action.failed: terminal failure; inspectfailure_reasonwhen present. Replacement codes the store paid for can still be added tocodes, and a dashboard retry moves the order back toprocessing.canceled: terminal cancellation; no fulfillment action remains.
