Skip to Content
Docs

Payments

Withdrawals

Send your prepaid balance back to your wallet.

POST /v1/balance/withdraw sends FLOP from the deposit wallet to the wallet that owns your key. It cannot send anywhere else.

Shell
curl -X POST https://api.floprouter.com/v1/balance/withdraw \
  -H "Authorization: Bearer $FLOPROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": "0.5"}'
FieldMeaning
amountDecimal FLOP, or "all" for the whole available balance.
toOptional. When given, it must equal the wallet that owns the key.

The amount is held first, so a withdrawal cannot race a session or another withdrawal. The chain fee is estimated and taken out of the amount sent.

Response

200 once the transfer is final on chain. The shape, with placeholder values:

JSON
{
  "object": "withdrawal",
  "id": "...",
  "to": "5...",
  "status": "sent",
  "requested": "0.5",
  "sent": "<amount minus the fee estimate>",
  "chain_fee": "<fee the chain charged>",
  "tx": "0x...",
  "block": 4498929,
  "balance_after": "<what is left>"
}

sent is the requested amount minus the fee estimate. chain_fee is the fee the chain charged. The ledger in GET /v1/balance books both, as withdrawal and withdrawal_fee.

Limits and errors

  • One withdrawal per wallet at a time, and at most 10 per wallet per hour.
HTTPcodeWhat it means
400invalid_amount, amount_too_small, invalid_destinationThe amount or to is not valid. Nothing was sent.
402insufficient_balanceThe available balance is less than the amount. Nothing was sent.
409withdrawal_in_progressAnother withdrawal for this wallet is in flight. Wait for it.
429rate_limitedMore than 10 in the hour. Wait for Retry-After.
503withdrawals_unavailable, treasury_insufficient, withdrawal_failedThe transfer was not sent. Your balance is unchanged. Retry later.
503withdrawal_outcome_unknownThe transfer's outcome is not known yet. The amount stays held until the router reconciles it. Do not retry; check GET /v1/balance.