Mexico: topping up without a card (SPEI and OXXO)
Built: 2026-11-03. Written for operators in Mexico and for whoever maintains the code.
Many Mexican riders have no card that works online. Most of them do have a bank app, or an OXXO shop around the corner. RideKit gives them two ways to put money in their wallet. Both run on the installation's Stripe account, with no second set of keys.
| Way | What the rider does | When it arrives |
|---|---|---|
| Bank transfer (SPEI) | Sends the amount from their bank app to a CLABE | Usually minutes |
| Cash at OXXO | Pays cash at the till with a voucher reference | Up to a day after paying; the voucher lasts 3 days |
Both are wallet top-ups only: a payment that arrives later cannot pay for a ride that has already ended. For the ride itself the rider pays with their wallet, a card or cash.
Turning it on
- Admin → Providers → Stripe: add the Stripe secret key and webhook secret.
- In the Stripe dashboard, turn on bank transfers (for SPEI) and OXXO. Both need a Mexican Stripe account.
- Admin → Markets → Mexico → Payments: tick SPEI bank transfer and OXXO cash voucher. A new Mexican installation has both ticked.
- Point Stripe webhooks at these addresses. Status is also checked in the
background, so a missed webhook only delays the credit.
/api/payments/webhook/spei;/api/payments/webhook/oxxo.
What the rider sees
Wallet → Add money → Bank transfer (SPEI):
- the CLABE, grouped for reading (646 180 15700000000 4);
- the reference;
- the bank name.
Tapping copies a value. The screen also:
- asks the rider to send the exact amount;
- links to Stripe's full instructions;
- watches for the money and credits the wallet when it lands.
The rider can leave the screen and come back. Each rider keeps the same CLABE: one Stripe customer per rider, found again by their id.
If the rider sends less, Stripe holds what arrived and the top-up waits for the rest. If the money never comes, the top-up ends as "expired" after 3 days. Money that arrives after that sits in the rider's Stripe customer balance; apply it or refund it from Stripe.
Paying what you owe
After a cash trip paid short (see cash-first-mexico.md), the wallet shows
the pending balance with a Pay MX$24.00 now button. The amount is
rounded up to a whole peso so nothing is left owing. The button opens the
normal top-up with any of the rails above. The top-up clears the debt, and
the few cents of rounding stay in the wallet.
Code
backend/src/payments/providers/spei-payment.provider.ts: the SPEI rail (Stripecustomer_balancewithmx_bank_transfer);providers/oxxo-payment.provider.ts: the OXXO rail;topup-rail.resolver.ts: rail order. SPEI comes after cards and before OXXO;rider-payments.controller.ts: a card check (verify) refuses an OXXO or SPEI payment, so no top-up can be credited twice;- rider app:
app/(app)/pay-async.tsx(bank_transfer);app/(app)/wallet.tsx(wallet-pay-pending).
For development, STRIPE_API_BASE=http://localhost:12111 points every
Stripe client at a local mock. No test ever reaches the real API.
Check locally
No real SPEI transfer or OXXO voucher has been settled through this installation yet. Run one test-mode payment of each on your Stripe account before launch.