Payezydevelopers
Sandbox

API reference / Withdrawals

Withdraw to your own account

POST/v1/orgs/{orgId}/withdrawals

Moves funds to one of the organization's own accounts. Follows the same approval policy and limits as payments. Requires two-factor authentication.

Before you call it

  • Organizationactive
  • Permissionwithdrawals:create
  • Second factorRequired for browser sessions. An API key with the scope replaces it.
  • IdempotencySend an Idempotency-Key. Retrying with the same key returns the original result.

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)requiredOne of the organization's own accounts
amountstringrequiredNo description in the spec yet.
assetenumNo description in the spec yet.

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.

Response 200

Replay of an earlier request with the same Idempotency-Key

FieldWhat it does
idstring (uuid)requiredNo description in the spec yet.
account_idstring (uuid)requiredNo description in the spec yet.
directionenumrequiredNo description in the spec yet.

One of inbound outbound

kindstringrequiredNo description in the spec yet.
purposeenumpayment sends to a third party, withdrawal moves funds to the organization's own account, deposit is incoming

One of payment withdrawal deposit

invoice_numberstringNo description in the spec yet.
statusstringrequiredNo description in the spec yet.
amountstringrequiredNo description in the spec yet.
assetstringrequiredNo description in the spec yet.
feestringrequiredNo description in the spec yet.
railstringrequiredNo description in the spec yet.
memostringrequiredNo description in the spec yet.
failurePaymentFailureNo description in the spec yet.
failure.codestringrequiredNo description in the spec yet.
failure.reasonstringrequiredNo description in the spec yet.
created_atstring (date-time)requiredNo description in the spec yet.
completed_atstring (date-time)No description in the spec yet.
counterparty_idstring (uuid)No description in the spec yet.
recipientstringRecipient name (outbound)
recipient_accountstringMasked destination, e.g. Chase ••6789
dest_assetstringStablecoin delivered (crypto payouts)
dest_networkstringNo description in the spec yet.
tx_hashstringOn-chain hash or bank trace number
approvals_requiredintegerNo description in the spec yet.
created_bystring (uuid)No description in the spec yet.

Events it causes

Errors to handle

CodeWhat it means and what to do
not_own_account422You tried to withdraw to a third party.

Use a payment to send money to a recipient.

insufficient_funds422The available balance cannot cover the amount plus fee.

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

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.

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.

Every error is a Problem document. Branch on code; quote request_id to support.