API reference / Act as a platform
Quote a customer's payment
POST/v1/platforms/{platformOrgId}/customers/{customerOrgId}/payments/quote
Acts on a linked customer with the platform's own key or team (platform:customer_operate). Same as POST /v1/orgs/{orgId}/payments/quote. Prices each way to send a payment (rail, fee, arrival) without moving money.
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 |
|---|---|
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
Options ordered by the requested policy
| Field | What it does |
|---|---|
amountstringrequired | Amount as a decimal string in major units, such as dollars. |
assetstringrequired | Asset code, such as USD, USDC, or SBC. |
availablestringrequired | Available balance |
optionsPaymentOption[]required | Rails that can send this payment, each with a fee and an arrival time. |
options[].railstringrequired | How the money moves. Send one of the values this field allows. |
options[].feestringrequired | Fee as a decimal string in the same units as the amount. Creating a payment reserves the amount plus this fee. |
options[].eta_secondsintegerrequired | Estimated seconds until the money arrives. |
options[].arrives_bystring (date-time)required | When the money is expected to arrive, as an ISO-8601 timestamp. |
options[].brandablebooleanrequired | The recipient sees your business name |
options[].payezy_feestring | Payezy's fee (part of fee); 0 for customers billed through a platform |
options[].network_feestring | Rail or network cost (part of fee) |
options[].fee_linesFeeLine[] | fee broken down; the lines sum to fee |
options[].fee_lines[].kindenumrequired | payezy: Payezy's fee; network: rail or network cost One of |
options[].fee_lines[].codestringrequired | Billing product code (payezy) or rail (network) |
options[].fee_lines[].labelstringrequired | Short name chosen for this record. |
options[].fee_lines[].amountstringrequired | Amount as a decimal string in major units, such as dollars. |
Errors to handle
| Code | What it means and what to do |
|---|---|
insufficient_funds422 | The available balance cannot cover the amount plus fee. Fund the account, or send less. Quote first to see the fee. |
no_route422 | No enabled rail and partner can carry this payment. Try another rail or asset, or drop the |
invalid_amount422 | Enter a positive amount. |
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. |
Every error is a Problem document. Branch on code; quote request_id to support.