Skip to main content
This fund-moving route uses the active verified merchant’s API key or supported merchant session. The source Circle wallet comes from that merchant, not a body-supplied payer. External-wallet merchants manage their funds in their own wallet.

Request

POST https://flarehq.xyz/api/merchant/withdraw The route applies the withdrawal limiter, requires a bound Circle wallet, checks mainnet wallet liveness and compares the requested amount with the Circle balance. That amount check does not establish that extra gas/token fees are covered.

Replay and uncertainty

The stored key is namespaced by merchant ID. A claim row is created before the transfer. An existing key returns the saved amount, nullable hash and replayed: true; success reflects whether the row is SUCCESS. It does not compare a complete request-body digest or resend a PROCESSING withdrawal. If execution or the post-transaction database update is uncertain, the row can remain PROCESSING. Reconcile the Circle transaction, actual receipt and saved row before deciding what happened. Do not use a fresh key to bypass an unresolved claim. The success response does not prove a failed database update was repaired.

Response

Fresh success includes success, txHash, explorerUrl, amount, currency: 'USDC', from and to. Replay has a different, compact shape and can omit parties or explorer URL. Missing authentication returns 401; invalid fields/key/wallet or insufficient balance return 400; liveness failures have update/retry codes; caught execution failure returns 500. On-chain withdrawal is irreversible. Check recipient credit, fees and the receipt before retrying an uncertain withdrawal.