Payezydevelopers
Sandbox

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

  • Permissionpayments:create

Parameters

ParameterWhat it does
orgIdpath, uuidrequiredThe 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, uuidrequiredA payment from createPayment or listPayments.

Response 200

Canceled

FieldWhat it does
idstring (uuid)requiredNo description in the spec yet.
account_idstring (uuid)requiredNo description in the spec yet.
directionenumrequiredNo description in the spec yet.

One of inbound outbound

kindstringrequiredNo description in the spec yet.
purposeenumpayment sends to a third party, withdrawal moves funds to the organization's own account, deposit is incoming

One of payment withdrawal deposit

invoice_numberstringNo description in the spec yet.
statusstringrequiredNo description in the spec yet.
amountstringrequiredNo description in the spec yet.
assetstringrequiredNo description in the spec yet.
feestringrequiredNo description in the spec yet.
railstringrequiredNo description in the spec yet.
memostringrequiredNo description in the spec yet.
failurePaymentFailureNo description in the spec yet.
failure.codestringrequiredNo description in the spec yet.
failure.reasonstringrequiredNo description in the spec yet.
created_atstring (date-time)requiredNo description in the spec yet.
completed_atstring (date-time)No description in the spec yet.
counterparty_idstring (uuid)No description in the spec yet.
recipientstringRecipient name (outbound)
recipient_accountstringMasked destination, e.g. Chase ••6789
dest_assetstringStablecoin delivered (crypto payouts)
dest_networkstringNo description in the spec yet.
tx_hashstringOn-chain hash or bank trace number
approvals_requiredintegerNo description in the spec yet.
created_bystring (uuid)No description in the spec yet.

Events it causes

Errors to handle

CodeWhat it means and what to do
not_cancelable409The 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.