Brazil: drivers cash out by Pix
Built: 2026-11-03. Written for operators in Brazil and whoever maintains the code.
Drivers in Brazil expect their money the same day. Uber calls this "Saque" and 99 calls it "Saque na hora". In RideKit, a driver taps Cash out now, enters their Pix key once, and the money leaves at once by Pix. It usually arrives in seconds, any day and any time.
What the driver sees
- Wallet: what is available now, how many withdrawals are left today, the smallest and largest amount, the fee (free unless you set one), and: "Sent by Pix: it usually arrives in seconds, any day and any time."
- Pix key: CPF, CNPJ, phone, e-mail or random key. The form says what kind of key was typed (for example "✓ Phone key +5511987654321") or that it is not a Pix key, before anything is sent.
- The withdrawal shows Processing, then Paid as soon as Asaas confirms. If the bank refuses (for example, the key does not exist), it shows Failed with the reason, and the money goes back to the wallet.
The rules (Admin → Markets → Brazil)
| Rule | Brazil default | Where |
|---|---|---|
| Paid on request, no operator approval | on | Payments → When drivers are paid |
| Smallest withdrawal | R$10,00 | market driver.payout.minMinor |
| Largest withdrawal | R$200.000,00 | driver.payout.maxMinor |
| Withdrawals per day | 3 | driver.payout.maxPerDay |
| Fee | none | driver.payout.feeFlatMinor / feeBps |
| Promised arrival | 5 minutes | driver.payout.expectedSettlementMinutes |
Everything the driver is told comes from these numbers. The app does not use copy of its own, so the promise and the rule cannot drift apart.
Setting it up
- Admin → Providers → Asaas: the API key (the same account that takes riders' Pix) and the webhook token.
- In Asaas, enable transfers, and point the transfers webhook to
https://<your API>/api/payouts/webhook/asaaswith the same token. - Keep enough balance in the Asaas account. Drivers are paid from it.
Without the Asaas key, nothing breaks. A withdrawal waits in Admin → Payouts for an operator, and the driver is told "reviewed by our team", not "instant". An operator can also send a waiting withdrawal through Asaas from the queue.
How it is checked
The key is recognised and stored in the form Pix expects:
- CPF and CNPJ by their check digits;
- phones as
+55…; - e-mails in lower case.
Its type goes to Asaas with it.
The money is held from the wallet when the driver asks. It leaves through Asaas (
POST /transfers,operationType: PIX).The outcome comes from Asaas's transfer webhook, which must carry the token. The transfer's state is then read back from Asaas before anything changes. The 10-minute payout sweep asks Asaas too, so a missed webhook is caught.
For the code
| What | Where |
|---|---|
| Pix key rules | backend/src/payouts/pix-key.ts (and mobile/driver/src/lib/pix-key.ts) |
| Rail | backend/src/payouts/providers/asaas-pix-payout.provider.ts (asaas_pix) |
| Webhook | backend/src/payouts/asaas-payout-webhook.controller.ts |
| Brazil defaults | payout-schedule.ts (instant), drivers/driver-limits.ts (R$10, 5 minutes) |
| Driver app | app/(app)/wallet.tsx (key check, Pix note) |
Error code: pix_key_invalid.
Check before launch. The adapter follows Asaas's published transfers contract and was exercised against a local stand-in, not a live account. Send one sandbox transfer first. Asaas charges per Pix transfer beyond its free allowance. Decide whether to absorb that or set a fee, and confirm the Brazil defaults above with your finance team.