Mexico: paying drivers at once over SPEI, and at least weekly
Built: 2026-11-03. Written for operators in Mexico and for whoever maintains the code.
Mexican drivers expect their money right after a trip (Uber Pro Card, DiDi Pay), and the labour law's platform-work chapter (LFT) asks for pay at least weekly. RideKit now does both.
Cash out now (SPEI through STP)
With STP configured, a driver's Cash out now leaves at once: an SPEI transfer to their CLABE, which normally lands in seconds. It used to wait in the operator's queue.
The flow:
- The driver asks. The amount is held from their wallet, and the market's fee and limits apply as before.
- RideKit sends STP a signed order for the net amount.
- STP reports the outcome on its webhook:
- Liquidada marks the withdrawal paid;
- Devuelta or Cancelada (e.g. a wrong CLABE) marks it failed, with the reason, and the money goes back to the driver's wallet.
If STP refuses the order, the withdrawal stays in the operator's queue with the money still held. Nothing is lost.
Setting up STP
Admin → Providers → STP — SPEI driver payouts (Mexico):
| Field | What to put |
|---|---|
| Empresa | Your company name at STP |
| Your STP account CLABE | The account the transfers are paid from (cuenta ordenante) |
| Signing private key (PEM) | The key you registered with STP. Pasting it on one line is fine. |
| Private key passphrase | If the key has one |
| Your RFC | Optional: shown to the receiving bank |
| API base URL | Blank for STP's demo; STP gives you the production URL |
| State-change webhook token | A long random string |
Then give STP this state-change address:
https://<your-api>/api/payouts/webhook/stp/<token>.
STP does not sign its notices. The token in the address is what proves a notice came from STP. Only an order of ours that is still under way can change.
The market's payout rules
Admin → Markets → Mexico → Payments → Driver payouts:
Send withdrawals at once: on by default in Mexico. Off, every withdrawal waits for you as before.
Pay every driver at least weekly, and the payday: Monday by default. On payday, early in the market's night, every driver gets their withdrawable balance paid to the account they last used, whether or not they asked. This covers drivers who:
- are not on the nightly cash-out;
- have an account on file (the nightly cash-out account, else the one their last paid withdrawal went to);
- withdrew nothing in the last six days.
Below the market's minimum, the balance waits for next week.
Drivers see "Paid every Monday to the account you last used, even if you don't withdraw" in their wallet. Drivers on the nightly cash-out are already paid daily.
Code
backend/src/payouts/providers/stp-payout.provider.ts: the signed order, the CLABE → bank code, the name clean-up and the STP states (pure parts tested);stp-webhook.controller.ts: the state-change notice;payout-schedule.ts: instant and the weekly floor per market;payout.manager.ts:resolveConfiguredpicks a configured rail for the currency over the manual queue;payout.service.ts:sendNowIfInstantandweeklyPayday;auto-payout.service.ts:runWeekly;- admin:
components/markets/PayoutScheduleCard.tsx;providers/page.tsx;
- driver app:
app/(app)/wallet.tsx.
Check locally
No order has gone through a real STP account yet. Run one in STP's demo before launch, and confirm with your labour counsel the payday and how withdrawal fees fit the LFT's rules for platform workers.