Cancel transaction
Requests cancellation of a transaction owned by your site. Processing is asynchronous: a `200` means the request was accepted, not that the transaction is already cancelled. Requires merchant bearer token (`Authorization: Bearer …`) and API cancellation enabled for the transaction's method on your site. Only Interac e-Transfer request-money and send-money transactions and bill payments in `pending`, `sent`, or `confirming` can be cancelled, and only when the bank processing them supports cancellation. A request-money transaction in `confirming` is declined instead, and only when your site allows it. ACH transactions return `1175`. Every other method, including digital cheque, direct deposit, instant direct deposit, online banking, and wire transfer, returns `1801`. A transaction whose bank hasn't returned a reference yet returns `1802`; try again later. See [Cancel an eligible transaction](/docs/refunds-cancellations#cancel-an-eligible-transaction). Every `400` lists its codes in `errors`, an array of `{message, code}` objects, and includes `request_ref_id`. **Authentication errors:** Authentication can return codes `1000`-`1008` for client IP, token, site, whitelist, signature, session, or token scope validation. See [Authentication](/docs/authentication) and [Error codes](/docs/error-codes).