Guides
Withdrawals
Send PIX or crypto from an account and follow settlement at the bank or on-chain.
A withdrawal order holds amount + fee right away, goes through the payment connector and the bank (or the network) and ends COMPLETED or FAILED.
| Status | customerStatus | Meaning |
|---|---|---|
PENDING_TREASURY | Processing | Waiting for treasury (account with autoExecuteWithdrawal: false) |
SENT_TO_CONNECTOR | Processing | Sent to the payment provider |
PENDING_IN_BANK | Processing | Accepted by the provider; waiting for the bank |
COMPLETED | Completed | Settled, with e2eId |
FAILED | Failed | Rejected, with failureReason; the hold goes back to the balance |
Create a PIX withdrawal
Required: amount, name (the receiver) and, on FIAT accounts, receiverAccountKey (the PIX key; requestedPixKey is accepted too).
curl -X POST https://bloquo.mimicr.dev/api/v1/customer/1001/orders/withdrawal/account/1004 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"amount": 500.00, "name": "Maria Santos", "receiverTaxId": "987.654.321-00", "receiverAccountKey": "maria@email.com"}'The response (201) is the order, with no envelope:
{
"id": 1057,
"customerId": 1001,
"accountId": 1004,
"requestedAmount": 500,
"totalAmount": 500,
"currency": "BRL",
"status": "SENT_TO_CONNECTOR",
"customerStatus": "Processing",
"origin": "API",
"receiverName": "Maria Santos",
"receiverTaxId": "987.654.321-00",
"receiverAccountKey": "maria@email.com",
"receiverWalletAddress": null,
"receiverBlockchain": null,
"e2eId": null,
"failureReason": null,
"webhookUrl": null,
"orderHistory": [
{ "createdAt": "2026-11-05T20:12:10.172Z", "statusName": "CREATED", "description": "Withdrawal order created; balance reserved." },
{ "createdAt": "2026-11-05T20:12:10.172Z", "statusName": "SENT_TO_CONNECTOR", "description": "Submitted to the payment provider." }
],
"createdAt": "2026-11-05T20:12:10.173Z",
"lastUpdatedAt": "2026-11-05T20:12:10.173Z"
}In Mimicr, the order moves to PENDING_IN_BANK about 1 second later and to COMPLETED about 3 seconds after that, with a Debit transaction of amount + fee. Every change, creation included, fires the Withdrawal webhook.
Create a crypto withdrawal
On crypto accounts, send receiverWalletAddress and receiverBlockchain. The address must be on the customer's whitelist and approved by compliance (see Counterparties and whitelist):
curl -X POST https://bloquo.mimicr.dev/api/v1/customer/1001/orders/withdrawal/account/1010 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"amount": 100, "name": "Jane", "receiverWalletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18", "receiverBlockchain": "Ethereum"}'On settlement, e2eId holds the transaction hash.
Errors
| HTTP | message |
|---|---|
| 400 | Insufficient balance to process order. |
| 400 | ReceiverAccountKey is required for fiat withdrawals. |
| 400 | Receiver WalletAddress '<address>' is not whitelisted. |
| 400 | Blockchain not supported for selected currency. |
| 400 | Name is required. |
| 400 | Customer is not active. (sub-account not Active) |
The balance checked is the available one (transactions minus holds) plus the account's maxAllowedDebt.
Treasury approval
If the account has autoExecuteWithdrawal: false, the withdrawal starts PENDING_TREASURY and stays there until treasury approves it. In Mimicr, you are treasury:
npx mimicr action bloquo withdrawal.approve withdrawalId=1057
Test the scenarios
Mimicr rule: a FIAT withdrawal ending in ,07 cents (e.g. 100.07) ends FAILED with failureReason Recipient bank rejected the transfer., and the hold goes back to the balance.
npx mimicr action bloquo withdrawal.complete withdrawalId=1057 npx mimicr action bloquo withdrawal.fail withdrawalId=1057 reason="Destination account closed" npx mimicr wait bloquo delivery order_type=Withdrawal order_id=1057 event=COMPLETED
withdrawal.complete settles right away, ignoring the ,07 rule (and approves first if the order is PENDING_TREASURY). withdrawal.fail rejects it with the reason you give. To keep every withdrawal from moving on its own, turn autoSettleOrders off.
List
GET /api/v1/customer/{customerId}/orders/withdrawal accepts status, startDate, endDate, page and pageSize and answers {items, meta}. .../orders/withdrawal/children returns the withdrawals of the sub-customers.
Reference: Create withdrawal order, List withdrawal orders, List child withdrawal orders.