Payezydevelopers
Sandbox

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

  • Organizationplatform
  • Permissionplatform:customer_operate

Parameters

ParameterWhat it does
platformOrgIdpath, uuidrequiredYour platform's organization id. platformOrgId is the platform response's org_id.
customerOrgIdpath, uuidrequiredcustomerOrgId is the customer response's org_id.

Request body

FieldWhat it does
namestringrequiredDisplay name.
kindenumWhich kind of record this is. When uploading a document, send the kind from required_documents. One of: individual, business.

One of individual business

Default "business"

emailstringEmail address.
categoryenumWhat kind of recipient this is, such as a vendor or a contractor.

One of vendor customer contractor employee other

bankBankAccountInputUS bank details for a new recipient account or an account the organization owns.
bank.labelstringNickname, e.g. Operating account (default: bank name and last four)
bank.owner_namestringName of the account holder at the other bank.
bank.bank_namestringName of the bank.
bank.routing_numberstringrequiredABA routing number of the US bank.
bank.account_numberstringrequiredBank account number. Responses return only the last four digits.
bank.account_typeenumWhether the bank account is a checking or savings account. One of: checking, savings.

One of checking savings

Default "checking"

bank.railsenum[]Rails this account can receive.

One of ach_credit same_day_ach_credit wire fednow_credit

bank.bank_addressAddressA postal address.
bank.bank_address.street_line_1stringrequiredStreet address.
bank.bank_address.street_line_2stringApartment, suite, or other second address line.
bank.bank_address.citystringrequiredCity.
bank.bank_address.statestringrequiredState or region. Use the USPS abbreviation when the country is US.
bank.bank_address.zipstringrequiredPostal code. In the United States this is the ZIP code.
bank.beneficiary_addressAddressA postal address.
bank.beneficiary_address.street_line_1stringrequiredStreet address.
bank.beneficiary_address.street_line_2stringApartment, suite, or other second address line.
bank.beneficiary_address.citystringrequiredCity.
bank.beneficiary_address.statestringrequiredState or region. Use the USPS abbreviation when the country is US.
bank.beneficiary_address.zipstringrequiredPostal code. In the United States this is the ZIP code.
walletWalletInputA stablecoin wallet address and the network it is on.
wallet.labelstringShort name chosen for this record.
wallet.networkstringrequiredBlockchain network, such as base.
wallet.addressstringrequiredOn-chain address of the wallet.

Response 201

Created (account numbers are never returned, only the last four digits)

FieldWhat it does
idstring (uuid)requiredRecipient id. Send it as counterpartyId.
namestringrequiredRecipient name shown on the payment.
kindenumrequiredWhether the recipient is an individual, a business, or the organization's own account. One of: individual, business, self.

One of individual business self

emailstringrequiredEmail address.
categoryenumrequiredWhat kind of recipient this is, such as a vendor or a contractor.

One of vendor customer contractor employee other

screening_statusenumrequiredclear means you can pay this recipient. review means wait. blocked means do not pay. One of: clear, review, blocked.

One of clear review blocked

accountsExternalAccount[]requiredPayezy accounts included on this record.
accounts[].idstring (uuid)requiredBank account or wallet id. Send it as external_account_id when you pay or withdraw.
accounts[].typeenumrequiredWhat kind of object this is. One of: bank, wallet.

One of bank wallet

accounts[].is_defaultbooleanrequiredThe account preselected when paying this recipient
accounts[].labelstringrequiredShort name chosen for this record.
accounts[].bank_namestringName of the bank.
accounts[].routing_numberstringABA routing number of the US bank.
accounts[].account_last4stringLast four digits of the bank account number.
accounts[].account_typestringWhether the bank account is a checking or savings account.
accounts[].railsstring[]requiredRails this account can receive.
accounts[].networkstringBlockchain network, such as base.
accounts[].addressstringOn-chain address when this account is a wallet.
created_atstring (date-time)requiredWhen this record was created, as an ISO-8601 timestamp.

Errors to handle

CodeWhat it means and what to do
invalid_routing_number422enter a valid 9-digit ABA routing number
invalid_account_number422account numbers are 4 to 17 digits
invalid_account_type422account type must be checking or savings
duplicate_account409this wallet is already saved for this recipient
name_required422name 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.