API reference / Payments and approvals
Cancel a payment
POST/v1/orgs/{orgId}/payments/{paymentId}/cancel
Cancels a payment that has not been sent yet and releases the reserved funds.
Before you call it
- Permission
payments:create
Parameters
| Parameter | What it does |
|---|---|
orgIdpath, uuidrequired | The organization the call acts on. For platform calls, your platform's id; for customer calls, the customer's organization id. Get them from getMe or the customer list. |
paymentIdpath, uuidrequired | A payment from createPayment or listPayments. |
Response 200
Canceled
| Field | What it does |
|---|---|
idstring (uuid)required | No description in the spec yet. |
account_idstring (uuid)required | No description in the spec yet. |
directionenumrequired | No description in the spec yet. One of |
kindstringrequired | No description in the spec yet. |
purposeenum | payment sends to a third party, withdrawal moves funds to the organization's own account, deposit is incoming One of |
invoice_numberstring | No description in the spec yet. |
statusstringrequired | No description in the spec yet. |
amountstringrequired | No description in the spec yet. |
assetstringrequired | No description in the spec yet. |
feestringrequired | No description in the spec yet. |
railstringrequired | No description in the spec yet. |
memostringrequired | No description in the spec yet. |
failurePaymentFailure | No description in the spec yet. |
failure.codestringrequired | No description in the spec yet. |
failure.reasonstringrequired | No description in the spec yet. |
created_atstring (date-time)required | No description in the spec yet. |
completed_atstring (date-time) | No description in the spec yet. |
counterparty_idstring (uuid) | No description in the spec yet. |
recipientstring | Recipient name (outbound) |
recipient_accountstring | Masked destination, e.g. Chase ••6789 |
dest_assetstring | Stablecoin delivered (crypto payouts) |
dest_networkstring | No description in the spec yet. |
tx_hashstring | On-chain hash or bank trace number |
approvals_requiredinteger | No description in the spec yet. |
created_bystring (uuid) | No description in the spec yet. |
Events it causes
Errors to handle
| Code | What it means and what to do |
|---|---|
not_cancelable409 | The payment was already sent to the partner. Payments can be canceled only before they are processing. |
Every error is a Problem document. Branch on code; quote request_id to support.