Create Withdrawal
Pays a member's balance out to an external address. member_id, dchain_id,
amount and address are required; the asset follows from the network.
amount is what the destination receives — the fee is charged on top of it.
/api/withdrawalsAuth: RequiredAnswers 201. Quote the fee first with
Withdrawal Fees — it returns the total fee and
the total that will be debited for exactly this amount, network and destination.
Request Body
member_idnumberRequiredThe member whose balance is paid out.
dchain_idstringRequiredThe network to pay out on, from List Assets.
The asset is derived from it — there is no asset_id field on this call.
amountstring | numberRequiredThe amount the destination receives. The fee is charged on top, so the
balance is debited amount + fee. Accepted as a string or a number; send a
string to avoid float rounding.
addressstringRequiredDestination address.
address_tagstringDestination memo, for networks that use one (XRP, XLM, TON).
client_withdrawal_idstringYour own id for this payout. Optional — but see the warning below. It is also a filter on List Withdrawals, which is how you check whether a payout landed.
Response
201, with the created payout.
The payout comes back with its id, its public uuid, the fee that was applied,
operation_type, and status — which starts at aml_processing. Read it back with
Get Withdrawal to follow it to a terminal state.
Errors
Beyond the shared errors:
| Code | Meaning |
|---|---|
1001 | A field is invalid or the object is not yours — the message names it: member_id, dchain_id, or client_withdrawal_id is not unique for owner |
1003 | Amount, balance or address failed validation; the message carries the detail |
2066 | This network needs a destination tag as well as an address |
2002 | The core refused the payout; the reason is in the message |
2070 | Payouts are switched off for the moment — retry later |
3009 | The core is in maintenance — retry later |
client_withdrawal_id is optional, and the API does not document any
deduplication. A request that times out, or a retry loop, can create a second
payout and send the money twice.
Protect yourself on the client side:
- Always send a
client_withdrawal_idyou generated, one per intended payout. - If a request fails or times out, do not blindly retry. First call
GET /api/withdrawals?member_id=…&client_withdrawal_id=…and see whether the payout already exists. - Only retry when that lookup comes back empty.
Do not rely on the service recognising a reused client_withdrawal_id for you.
Treat duplicate protection as your responsibility.
The member needs amount + fee on the balance, not amount. So whenever there is
a fee, a payout of exactly the whole balance cannot go through.
Call Withdrawal Fees first: it returns
total_fee and total_amount (= amount + total_fee) for this exact request.
For a "send everything" flow, quote first and then send balance − total_fee.
This is the one call that sends funds to an address you supply, and the token in the header authorises it on its own. Validate the destination address in your own code before calling, and keep the token server-side.