API reference / Act as a platform
Create a customer's payment
POST/v1/platforms/{platformOrgId}/customers/{customerOrgId}/payments
Acts on a linked customer with the platform's own key or team (platform:customer_operate). Same as POST /v1/orgs/{orgId}/payments. Sends money to a recipient. The amount plus fee is reserved immediately; payments above the approval threshold wait for approvers. Requires two-factor authentication. Retrying with the same Idempotency-Key returns the original payment.
When to use it
Paying a recipient from the customer's account with your platform key. Send a new Idempotency-Key.
Before you call it
- Organization
platform, customer active - Permission
platform:customer_operate - IdempotencySend an
Idempotency-Key. Retrying with the same key returns the original result.
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 |
|---|---|
account_idstring (uuid)required | Payezy account to send from. Use an id from list accounts. |
external_account_idstring (uuid)required | The recipient's bank account or wallet |
amountstringrequired | How much to send, as a decimal string in major units. The fee from the quote is reserved on top of this. |
assetenum | Stablecoin to deliver to a wallet (default USDC) One of |
railenum | Rail to use. Take it from the quote. Omit it and set policy to let Payezy choose. One of: ach_credit, same_day_ach_credit, wire, fednow_credit, onchain. One of |
policyenum | cheapest picks the lowest fee. fastest picks the earliest arrival. Ignored when rail is set. One of: cheapest, fastest. One of Default |
memostring | Note that travels with the payment, up to 140 characters. |
invoice_numberstring | The invoice or bill this payment settles |
Response 200
Replay of an earlier request with the same Idempotency-Key
| Field | What it does |
|---|---|
idstring (uuid)required | Payment id. Send it as paymentId to get, cancel, approve, or reject the payment. |
account_idstring (uuid)required | Payezy account the money moved from or into. |
directionenumrequired | Whether money came in or went out. One of: inbound, outbound. One of |
kindstringrequired | How the money moved, for example a fiat deposit or a payout. |
purposeenum | payment sends to a third party, withdrawal moves funds to the organization's own account, deposit is incoming One of |
invoice_numberstring | Your invoice or bill number, up to 64 characters. It is stored on the payment. |
statusstringrequired | Where the payment is in its lifecycle, such as pending_approval, processing, completed, failed, or canceled. |
amountstringrequired | Payment amount as a decimal string in major units of asset. |
assetstringrequired | Asset code, such as USD, USDC, or SBC. |
feestringrequired | Fee reserved with the amount, as a decimal string. |
railstringrequired | Rail that sent or received the money, such as ach_credit, wire, or onchain. |
memostringrequired | Note stored with the payment, up to 140 characters. |
failurePaymentFailure | Why a payment failed and the code to branch on. |
failure.codestringrequired | Stable reason the payment failed. |
failure.reasonstringrequired | Why this happened, or why the change is being made. |
created_atstring (date-time)required | When this record was created, as an ISO-8601 timestamp. |
completed_atstring (date-time) | When this finished, as an ISO-8601 timestamp. |
counterparty_idstring (uuid) | Recipient id. A recipient is a counterparty. |
recipientstring | Recipient name (outbound) |
recipient_accountstring | Masked destination, e.g. Chase ••6789 |
dest_assetstring | Stablecoin delivered (crypto payouts) |
dest_networkstring | Network a crypto payout is delivered on. |
tx_hashstring | On-chain hash or bank trace number |
tx_urlstring | Block explorer page for tx_hash. Set only for a crypto payout whose network Payezy supports. |
from_addressstring | On-chain address a crypto payout was sent from (the customer's holding wallet). |
to_addressstring | On-chain address a crypto payout was sent to (the destination wallet). |
approvals_requiredinteger | How many approvals the payment still needs. |
created_bystring (uuid) | User id of the person who created this. |
Events it causes
Errors to handle
| Code | What it means and what to do |
|---|---|
own_account422 | You tried to pay one of your own accounts. Use a withdrawal for your own accounts. |
insufficient_funds422 | The available balance cannot cover the amount plus fee. Fund the account, or send less. Quote first to see the fee. |
recipient_blocked403 | Screening blocked this recipient. Payments to a blocked recipient are not possible. Contact support if you believe this is wrong. |
recipient_under_review409 | Screening is reviewing this recipient. Wait for review to clear; then pay. |
single_payout_limit422 | The amount is above the organization's single-transfer limit. Send less, or ask Payezy about your limits ( |
daily_payout_limit422 | Today's payouts would go over the daily limit. Send the rest tomorrow, or ask Payezy about your limits. |
above_ceiling422 | The amount is above Payezy's hard ceiling. Split the payment. |
idempotency_key_reused409 | The key was already used for a different request. Generate a new key for a new payment. Reuse a key only to retry exactly the same request. |
org_restricted403 | Outgoing payments are paused for this organization by Payezy or its platform. Incoming money and reads still work. Contact the platform or Payezy support. |
invalid_rail422 |
Every error is a Problem document. Branch on code; quote request_id to support.