API reference / Act as a platform
Remove a customer's recipient account
DEL/v1/platforms/{platformOrgId}/customers/{customerOrgId}/counterparties/{counterpartyId}/accounts/{externalAccountId}
Acts on a linked customer with the platform's own key or team (platform:customer_operate). Same as DELETE /v1/orgs/{orgId}/counterparties/{counterpartyId}/accounts/{externalAccountId}. Removes one of a recipient's accounts; the recipient keeps at least one. Requires two-factor authentication.
Before you call it
- Organization
platform - Permission
platform:customer_operate
Parameters
| Parameter | What it does |
|---|---|
platformOrgIdpath, uuidrequired | Your platform's organization id. platformOrgId is the platform response's org_id. |
customerOrgIdpath, uuidrequired | customerOrgId is the customer response's org_id. |
counterpartyIdpath, uuidrequired | The recipient id from list recipients or create recipient. A recipient is a counterparty. |
externalAccountIdpath, uuidrequired | A bank account or wallet id on the recipient, or on an account the organization owns. |
Response 200
The recipient without the account
| Field | What it does |
|---|---|
idstring (uuid)required | Recipient id. Send it as counterpartyId. |
namestringrequired | Recipient name shown on the payment. |
kindenumrequired | Whether the recipient is an individual, a business, or the organization's own account. One of: individual, business, self. One of |
emailstringrequired | Email address. |
categoryenumrequired | What kind of recipient this is, such as a vendor or a contractor. One of |
screening_statusenumrequired | clear means you can pay this recipient. review means wait. blocked means do not pay. One of: clear, review, blocked. One of |
accountsExternalAccount[]required | Payezy accounts included on this record. |
accounts[].idstring (uuid)required | Bank account or wallet id. Send it as external_account_id when you pay or withdraw. |
accounts[].typeenumrequired | What kind of object this is. One of: bank, wallet. One of |
accounts[].is_defaultbooleanrequired | The account preselected when paying this recipient |
accounts[].labelstringrequired | Short name chosen for this record. |
accounts[].bank_namestring | Name of the bank. |
accounts[].routing_numberstring | ABA routing number of the US bank. |
accounts[].account_last4string | Last four digits of the bank account number. |
accounts[].account_typestring | Whether the bank account is a checking or savings account. |
accounts[].railsstring[]required | Rails this account can receive. |
accounts[].networkstring | Blockchain network, such as base. |
accounts[].addressstring | On-chain address when this account is a wallet. |
created_atstring (date-time)required | When this record was created, as an ISO-8601 timestamp. |
Errors to handle
| Code | What it means and what to do |
|---|---|
last_account409 | You tried to remove a recipient's only account. Add another account first, or archive the recipient. |
Every error is a Problem document. Branch on code; quote request_id to support.