Skip to main content
POST
Prepare a Withdrawal
Note: When using the production environment at moonpay.hel.io, set your API endpoint to api.hel.io/v1. For the development environment, use api.dev.hel.io/v1.
Display summary as your confirmation screen. When available, summary.destinationAmountUsd and summary.destinationAmountMinUsd provide the USD value of the destination amounts for display (both optional — omit them from your UI when absent). The quote and token expire at summary.expiresAt. sourceCurrencyId is always required. Optionally pass customerId (max 255 characters) to attach a merchant-defined end-user identifier to the quote. Inspect prepared.kind to determine what to sign: raw (Solana unsignedTx), userop (EVM ERC-4337 user operation), or hypercore (Hyperliquid EIP-712 typedData).Amount precision: amount must be in the source currency’s atomic units. Resolve sourceCurrencyId to its decimals value (via Get Withdrawal Currencies) and compute humanAmount × 10^decimals. USDC on HyperCore uses 8 decimals — e.g. 1.5 USDC = "150000000", not "1500000".

Path Parameters

withdrawalConfigId
string
required

The withdrawal config ID.

Body

application/json
ownerAddress
string
required

Holder's source wallet address. Format is lane-specific (e.g. Solana base58 for Solana raw, EVM checksummed address for EVM raw/hyperliquid).

recipient
string
required

Destination address on any supported chain.

amount
string
required

Amount in atomic units as a decimal-free string. Scale using the source currency's decimals value (e.g. 1500000 for 1.5 USDC at 6 decimals; 150000000 for 1.5 USDC at 8 decimals on HyperCore).

Pattern: ^\d+$
toCurrencyId
string
required

Destination currency Mongo ID.

sourceCurrencyId
string
required

Source currency Mongo ID from the withdrawal config.

customerId
string

Optional merchant identifier for the end user (max 255 characters). Persisted on prepare and echoed on the withdrawal detail and webhooks. Not applied on re-quote.

Maximum string length: 255
slippageBps
integer
default:500

Optional slippage tolerance in basis points (0–10000) forwarded to the swap/bridge provider. Defaults to 500 (5%) when omitted.

Required range: 0 <= x <= 10000

Response

Withdrawal prepared successfully.

withdrawalDetailId
string

Per-request ID. Use for submit and status polling.

token
string

JWT quote token. Pass verbatim on submit.

prepared
object
summary
object