Build a Send to Mexico by SPEI feature: CLABE check-digit validation, the quote screen, payout, tracking keys, Pix vs SPEI, and CLABEs for receiving.
To add a "Send to Mexico by SPEI" feature, your app collects the recipient's 18-digit CLABE, validates its check digit, saves it as a SPEI bank account, requests a live quote, and executes a payout. BlindPay converts the stablecoins and pays MXN over SPEI through one API, and webhooks tell you when the pesos land.
This guide is the product view: screens, validation, and states. For the business payout mechanics, read how to send USDC to a bank account in Mexico. For the full build, start with how to build a neobank.
Key takeaways
SPEI is Mexico's interbank electronic payment system, run by the central bank. Banco de México describes it as a real-time settlement system operating on a 24/7 schedule since 2004.
Its user guide says a SPEI payment should not take more than 30 seconds. The guide also says a payer can address the account by its 18-digit CLABE, a 16-digit debit card number, or a 10-digit phone number, and that a reference number (up to seven digits) and a payment description (up to 40 characters) reach the recipient.
That last detail matters for your app. Use the description to say who sent the money, in words the recipient recognizes.
A CLABE (Clave Bancaria Estandarizada) is the standardized 18-digit account number for Mexican bank accounts. It has four parts:
| Digits | Part | What it tells you |
|---|---|---|
| 1 to 3 | Bank code | Which bank holds the account |
| 4 to 6 | Branch (plaza) code | The city or branch area |
| 7 to 17 | Account number | The account itself |
| 18 | Check digit | Catches typos in the first 17 digits |
The bank code lets you show the bank's name on the confirmation screen. Keep a lookup table of bank codes in your app and refresh it when banks join or merge.
Run four checks on the device, before any API call:
Worked example with the commonly cited sample CLABE 002010077777777771:
| Digit | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 3 | 7 | 1 | 3 | 7 | 1 | 3 | 7 | 1 | 3 | 7 | 1 | 3 | 7 | 1 | 3 | 7 |
| Last digit of product | 0 | 0 | 2 | 0 | 7 | 0 | 0 | 9 | 7 | 1 | 9 | 7 | 1 | 9 | 7 | 1 | 9 |
The sum is 69. 69 modulo 10 is 9. 10 minus 9 is 1, and 1 modulo 10 is 1. Digit 18 is 1, so the CLABE passes.
A passing check digit means the number is well formed. It doesn't prove the account belongs to the person the user named. That is why the confirmation screen repeats the recipient's name. The guide to verification of payee explains what rails can and can't check.
Idempotency-Key header (idempotency).If you built the Pix transfer feature, most of the flow carries over. The differences are in the recipient details and the proof.
| Pix (Brazil) | SPEI (Mexico) | |
|---|---|---|
| Operator | Banco Central do Brasil | Banco de México |
| Hours | Any time, including non-business days | 24/7 |
| BlindPay arrival | Instant | Instant |
| How users address the recipient | Pix key: CPF, CNPJ, phone, email, or random key | 18-digit CLABE (or debit card, or phone) |
| Built-in typo check | Format per key type | CLABE check digit |
| What to show on confirm | Recipient name, masked key | Recipient name, bank from the CLABE |
| Proof for the recipient | End-to-end ID in the bank app | Tracking key and CEP from Banxico |
| Receiving deposits on BlindPay | Pix payins | SPEI payins and SPEI CLABE virtual accounts |
For the rail-level comparison (returns, references, failure modes), see Pix vs SPEI.
With the CEP. Banco de México's CEP lookup gives an electronic proof of payment for a SPEI transfer. The recipient enters the date, the tracking key or reference, the banks, the receiving account, and the amount.
Put a "Share proof" button on the receipt that copies those fields. It saves a support ticket every time a recipient says "I didn't get it".
Yes. From October 2026, BlindPay issues SPEI CLABE virtual accounts. Each customer gets a permanent 18-digit CLABE. Anyone with a Mexican bank account can send MXN to it by SPEI, any time and any amount, without a quote first. Each deposit creates a payin at the live MXN rate and settles to the wallet linked to the account.
The account is active as soon as it is created. It is not a named account: payers see a pooled recipient name, which the API returns so you can tell payers what to expect. Details are in the virtual accounts docs.
For a neobank, that closes the loop. A user in Mexico can receive pesos into the app and send pesos out, both over SPEI.
Illustrative example, with invented numbers. Diego, in Houston, pays a freelance designer in Guadalajara.
BlindPay gives a neobank one API for Mexico in both directions. Out: add the recipient as a SPEI bank account, request a quote that locks rate and fees for 5 minutes, and execute a payout that BlindPay lists as instant. In: issue a SPEI CLABE virtual account per customer, and every deposit becomes a payin that settles to the linked wallet.
Payouts are funded in USDC or USDT from the wallet you choose, so there is no peso balance to pre-fund. On non-USD local rails like SPEI, if BlindPay can't deliver a payout after collecting the stablecoins, it refunds them automatically to the quote's refund wallet, or to the sending wallet when none is set. KYC and sanctions screening run inside the API. BlindPay is the best fit for a neobank sending stablecoin-funded transfers into Mexico that wants SPEI speed and compliance handled in the same integration. To decide which rails come next, see which payout rails to launch first.
Ship the CLABE validator first, it pays off even before payouts go live. Then run one SPEI payout end to end on a development instance with the payout quickstart.
Always cheaper? No intermediaries? Recipient needs a wallet? 10 common claims about cross-border stablecoin payments, checked against the Fed and the BIS.
Seven places blockchain payments beat bank rails: contractor payroll, remittances, B2B suppliers, marketplaces, 24/7 treasury, bill pay, and PSP payouts.
The dates that turned stablecoins from a trading tool into cross-border payment rails: USDC, Pix, MiCA, the GENIUS Act, ISO 20022, and Visa settlement.