API reference / Act as a platform
Add a customer's recipient
POST/v1/platforms/{platformOrgId}/customers/{customerOrgId}/counterparties
Acts on a linked customer with the platform's own key or team (platform:customer_operate). Same as POST /v1/orgs/{orgId}/counterparties. Adds a recipient with a US bank account or a wallet. 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. |
Request body
| Field | What it does |
|---|---|
namestringrequired | Display name. |
kindenum | Which kind of record this is. When uploading a document, send the kind from required_documents. One of: individual, business. One of Default |
emailstring | Email address. |
categoryenum | What kind of recipient this is, such as a vendor or a contractor. One of |
bankBankAccountInput | US bank details for a new recipient account or an account the organization owns. |
bank.labelstring | Nickname, e.g. Operating account (default: bank name and last four) |
bank.owner_namestring | Name of the account holder at the other bank. |
bank.bank_namestring | Name of the bank. |
bank.routing_numberstringrequired | ABA routing number of the US bank. |
bank.account_numberstringrequired | Bank account number. Responses return only the last four digits. |
bank.account_typeenum | Whether the bank account is a checking or savings account. One of: checking, savings. One of Default |
bank.railsenum[] | Rails this account can receive. One of |
bank.bank_addressAddress | A postal address. |
bank.bank_address.street_line_1stringrequired | Street address. |
bank.bank_address.street_line_2string | Apartment, suite, or other second address line. |
bank.bank_address.citystringrequired | City. |
bank.bank_address.statestringrequired | State or region. Use the USPS abbreviation when the country is US. |
bank.bank_address.zipstringrequired | Postal code. In the United States this is the ZIP code. |
bank.beneficiary_addressAddress | A postal address. |
bank.beneficiary_address.street_line_1stringrequired | Street address. |
bank.beneficiary_address.street_line_2string | Apartment, suite, or other second address line. |
bank.beneficiary_address.citystringrequired | City. |
bank.beneficiary_address.statestringrequired | State or region. Use the USPS abbreviation when the country is US. |
bank.beneficiary_address.zipstringrequired | Postal code. In the United States this is the ZIP code. |
walletWalletInput | A stablecoin wallet address and the network it is on. |
wallet.labelstring | Short name chosen for this record. |
wallet.networkstringrequired | Blockchain network, such as base. |
wallet.addressstringrequired | On-chain address of the wallet. |
Response 201
Created (account numbers are never returned, only the last four digits)
| 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 |
|---|---|
invalid_routing_number422 | enter a valid 9-digit ABA routing number |
invalid_account_number422 | account numbers are 4 to 17 digits |
invalid_account_type422 | account type must be checking or savings |
duplicate_account409 | this wallet is already saved for this recipient |
name_required422 | name the key after the system that will use it |
unsupported_network422 |
Every error is a Problem document. Branch on code; quote request_id to support.