Withdraw an asset
Send funds from one of your merchant assets to an on-chain address. The requested amount (plus the system fee, see payer below) is immediately reserved from the asset’s available balance, and the with
Endpoint
POST /1.0/merchant/asset-withdrawal
Prerequisites
API withdrawals must be enabled for your merchant account (otherwise
400withAPI withdrawals are currently inactive).amountis expressed in the token’s base units (integer string, no decimal point). For a token with 6 decimals,100="100000000"— seecrypto.decimalson the Get Merchant Asset Data endpoint to convert.The withdrawal must meet the per-crypto minimum USD amount; amounts below it are rejected.
Request body
{
"assetId": "87d68a49-4b0c-4b4c-ad07-4f39aa4a39ab",
"amount": "60000000000000000000",
"address": "0x1111111111111111111111111111111111111111"
}assetId
string
yes
UUID of the merchant asset to withdraw from.
amount
string
yes
Withdrawal amount in the token’s base units (integer string).
address
string
no
Destination address. If omitted (or null), the asset’s default wallet is used (configure it in Assets → wallet). If neither is provided, the request is rejected. The address must be valid for the asset’s network; if a whitelist is enabled for your merchant, the address must be whitelisted.
Note on
payer. For API-created withdrawals the fee payer is always the sender: the system fee is added on top ofamountand debited from your available balance, and the recipient receives exactlyamount.payeris not an input parameter of this endpoint; it is returned in the response for reference.
cURL
curl -X POST "https://api.omypayments.com/1.0/merchant/asset-withdrawal" \
-H "Content-Type: application/json" \
-H "apiKey: <yourApiKey>" \
-d '{"assetId":"87d68a49-4b0c-4b4c-ad07-4f39aa4a39ab","amount":"60000000000000000000","address":"0x1111111111111111111111111111111111111111"}'Response (200 OK)
A freshly created withdrawal starts as pending. It transitions to success once sent on-chain, or failed if it is declined or the transaction is reverted. Track it via Get a withdrawal or callbacks.
Validation errors
400 Bad Request returns the standard validation envelope (see Error format):
Common messages:
Please, provide the address. To use default - edit your asset and create wallet address—addresswas omitted and the asset has no default wallet.The provided address is not valid— the address is not a valid format for the asset’s network.The provided address is not in whitelist— a whitelist is enabled and the address is not on it.API withdrawals are currently inactive— API withdrawals are disabled for your merchant.Insufficient balance— the asset’s available balance is lower thanamount+ fee.Minimum withdrawal amount is {amount}— below the per-crypto minimum.You have reached withdrawal limit/Maximum amount is {amount}— a merchant withdrawal limit was reached.Withdrawal is temporary unavailable— withdrawals for this crypto/network are temporarily disabled.Withdrawal amount must be greater than fee— the amount does not cover the system fee.Private payment is unavailable—isPrivatewas requested but the network does not support it.Withdrawals to your wallet are not possible as they do not comply with our AML policy. Please enter a different address— the destination address failed the AML risk check.
Other status codes:
401 Unauthorized— missingapiKeyheader.403 Forbidden— the API key lacks the withdrawal permission.
Last updated