Payezydevelopers
Sandbox

API reference / Payments and approvals

Quote a payment

POST/v1/orgs/{orgId}/payments/quote

Prices each way to send a payment (rail, fee, arrival) without moving money.

When to use it

Before every payment, to show the fee and arrival time for each rail. Pick policy cheapest or fastest, or a specific rail.

Before you call it

  • Permissionpayments:create

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.

Request body

FieldWhat it does
account_idstring (uuid)requiredNo description in the spec yet.
external_account_idstring (uuid)requiredThe recipient's bank account or wallet
amountstringrequiredNo description in the spec yet.
assetenumStablecoin to deliver to a wallet (default USDC)

One of USDC SBC

railenumNo description in the spec yet.

One of ach_credit same_day_ach_credit wire fednow_credit onchain

policyenumNo description in the spec yet.

One of cheapest fastest

Default "cheapest"

memostringNo description in the spec yet.
invoice_numberstringThe invoice or bill this payment settles

Response 200

Options ordered by the requested policy

FieldWhat it does
amountstringrequiredNo description in the spec yet.
assetstringrequiredNo description in the spec yet.
availablestringrequiredAvailable balance
optionsPaymentOption[]requiredNo description in the spec yet.
options[].railstringrequiredNo description in the spec yet.
options[].feestringrequiredNo description in the spec yet.
options[].eta_secondsintegerrequiredNo description in the spec yet.
options[].arrives_bystring (date-time)requiredNo description in the spec yet.
options[].brandablebooleanrequiredThe recipient sees your business name
options[].payezy_feestringPayezy's fee (part of fee); 0 for customers billed through a platform
options[].network_feestringRail or network cost (part of fee)
options[].fee_linesFeeLine[]fee broken down; the lines sum to fee
options[].fee_lines[].kindenumrequiredpayezy: Payezy's fee; network: rail or network cost

One of payezy network

options[].fee_lines[].codestringrequiredBilling product code (payezy) or rail (network)
options[].fee_lines[].labelstringrequiredNo description in the spec yet.
options[].fee_lines[].amountstringrequiredNo description in the spec yet.

Errors to handle

CodeWhat it means and what to do
insufficient_funds422The available balance cannot cover the amount plus fee.

Fund the account, or send less. Quote first to see the fee.

no_route422No enabled rail and partner can carry this payment.

Try another rail or asset, or drop the rail and use policy.

invalid_amount422Enter a positive amount.
single_payout_limit422The amount is above the organization's single-transfer limit.

Send less, or ask Payezy about your limits (getPaymentLimits shows them).

daily_payout_limit422Today'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.

Usually next

Used in guided journeys