Payezydevelopers
Sandbox

API reference / Recipients

Remove a recipient's account

DEL/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

  • Permissioncounterparties:manage
  • Second factorRequired for browser sessions. An API key with the scope replaces it.

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.
counterpartyIdpath, uuidrequiredA recipient from createCounterparty or listCounterparties.
externalAccountIdpath, uuidrequiredOne of the recipient's (or your own) bank accounts or wallets.

Response 200

The recipient without the account

FieldWhat it does
idstring (uuid)requiredNo description in the spec yet.
namestringrequiredNo description in the spec yet.
kindenumrequiredNo description in the spec yet.

One of individual business self

emailstringrequiredNo description in the spec yet.
categoryenumrequiredNo description in the spec yet.

One of vendor customer contractor employee other

screening_statusenumrequiredNo description in the spec yet.

One of clear review blocked

accountsExternalAccount[]requiredNo description in the spec yet.
accounts[].idstring (uuid)requiredNo description in the spec yet.
accounts[].typeenumrequiredNo description in the spec yet.

One of bank wallet

accounts[].is_defaultbooleanrequiredThe account preselected when paying this recipient
accounts[].labelstringrequiredNo description in the spec yet.
accounts[].bank_namestringNo description in the spec yet.
accounts[].routing_numberstringNo description in the spec yet.
accounts[].account_last4stringNo description in the spec yet.
accounts[].account_typestringNo description in the spec yet.
accounts[].railsstring[]requiredNo description in the spec yet.
accounts[].networkstringNo description in the spec yet.
accounts[].addressstringNo description in the spec yet.
created_atstring (date-time)requiredNo description in the spec yet.

Errors to handle

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