Payezydevelopers
Sandbox

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

  • Organizationplatform, customer active
  • Permissionplatform:customer_operate
  • IdempotencySend an Idempotency-Key. Retrying with the same key returns the original result.

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
account_idstring (uuid)requiredPayezy account to send from. Use an id from list accounts.
external_account_idstring (uuid)requiredThe recipient's bank account or wallet
amountstringrequiredHow much to send, as a decimal string in major units. The fee from the quote is reserved on top of this.
assetenumStablecoin to deliver to a wallet (default USDC)

One of USDC SBC

railenumRail 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 ach_credit same_day_ach_credit wire fednow_credit onchain

policyenumcheapest picks the lowest fee. fastest picks the earliest arrival. Ignored when rail is set. One of: cheapest, fastest.

One of cheapest fastest

Default "cheapest"

memostringNote that travels with the payment, up to 140 characters.
invoice_numberstringThe invoice or bill this payment settles

Response 200

Replay of an earlier request with the same Idempotency-Key

FieldWhat it does
idstring (uuid)requiredPayment id. Send it as paymentId to get, cancel, approve, or reject the payment.
account_idstring (uuid)requiredPayezy account the money moved from or into.
directionenumrequiredWhether money came in or went out. One of: inbound, outbound.

One of inbound outbound

kindstringrequiredHow the money moved, for example a fiat deposit or a payout.
purposeenumpayment sends to a third party, withdrawal moves funds to the organization's own account, deposit is incoming

One of payment withdrawal deposit

invoice_numberstringYour invoice or bill number, up to 64 characters. It is stored on the payment.
statusstringrequiredWhere the payment is in its lifecycle, such as pending_approval, processing, completed, failed, or canceled.
amountstringrequiredPayment amount as a decimal string in major units of asset.
assetstringrequiredAsset code, such as USD, USDC, or SBC.
feestringrequiredFee reserved with the amount, as a decimal string.
railstringrequiredRail that sent or received the money, such as ach_credit, wire, or onchain.
memostringrequiredNote stored with the payment, up to 140 characters.
failurePaymentFailureWhy a payment failed and the code to branch on.
failure.codestringrequiredStable reason the payment failed.
failure.reasonstringrequiredWhy this happened, or why the change is being made.
created_atstring (date-time)requiredWhen 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.
recipientstringRecipient name (outbound)
recipient_accountstringMasked destination, e.g. Chase ••6789
dest_assetstringStablecoin delivered (crypto payouts)
dest_networkstringNetwork a crypto payout is delivered on.
tx_hashstringOn-chain hash or bank trace number
tx_urlstringBlock explorer page for tx_hash. Set only for a crypto payout whose network Payezy supports.
from_addressstringOn-chain address a crypto payout was sent from (the customer's holding wallet).
to_addressstringOn-chain address a crypto payout was sent to (the destination wallet).
approvals_requiredintegerHow many approvals the payment still needs.
created_bystring (uuid)User id of the person who created this.

Events it causes

Errors to handle

CodeWhat it means and what to do
own_account422You tried to pay one of your own accounts.

Use a withdrawal for your own accounts.

insufficient_funds422The available balance cannot cover the amount plus fee.

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

recipient_blocked403Screening blocked this recipient.

Payments to a blocked recipient are not possible. Contact support if you believe this is wrong.

recipient_under_review409Screening is reviewing this recipient.

Wait for review to clear; then pay.

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.

above_ceiling422The amount is above Payezy's hard ceiling.

Split the payment.

idempotency_key_reused409The 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_restricted403Outgoing 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.

Usually next