How CoDi Works – Complete Guide to Mexico's Digital Payment System
Everything about CoDi (Cobro Digital): Mexico's QR payment system by Banxico. CLABE validation, SPEI infrastructure, BXC:// protocol, required fields and DiMo.
What is CoDi?
CoDi (Cobro Digital — "Digital Collection") is Mexico's national digital payment system, developed and operated by Banxico (Banco de México), the country's central bank. Launched in September 2019, CoDi enables merchants and individuals to receive payments via QR code or NFC, settled instantly through the SPEI interbank network — free of charge, 24 hours a day. Unlike most QR payment standards that are voluntary, CoDi was mandated by Banxico: all banks participating in SPEI are required to offer CoDi functionality to their customers. This means CoDi coverage spans every regulated bank in Mexico — BBVA México, Santander, Banorte, HSBC, Citibanamex, and 40+ others. CoDi differs from other QR payment systems in one important way: an amount is always required. CoDi initiates a specific SPEI transfer for a fixed amount — it is a "payment request" rather than an open QR that the payer fills in.
How CoDi Works – Step by Step
- 1
Merchant generates a CoDi QR code
Enter the CLABE (18-digit bank account) or registered phone number, the exact amount (required), a concept description, and a numeric reference. The QR encodes a BXC://SPEI payload.
- 2
Merchant displays the QR code
The QR can be shown on a phone screen, printed, or embedded in an invoice or website. CoDi also supports NFC for contactless payment.
- 3
Customer opens their bank app
Any SPEI-participant bank app supports CoDi. The customer selects the CoDi payment option (usually under "Pay" or "Cobrar/Pagar").
- 4
Customer scans the QR code
The app reads the BXC://SPEI payload, extracting the recipient's CLABE or phone, amount, concept, and reference. These are displayed for review.
- 5
Customer authenticates
The customer confirms the payment using their bank's authentication (NIP, biometrics). The transfer is initiated from their SPEI-linked account.
- 6
SPEI processes the transfer
Banxico's SPEI infrastructure processes the transfer in under 30 seconds. SPEI operates 24/7/365.
- 7
Merchant receives confirmation
The merchant's bank sends an instant credit notification. The numeric reference and concept in the SPEI record enable automatic reconciliation.
CLABE – Mexico's Bank Account Standard
CLABE (Clave Bancaria Estandarizada) is Mexico's 18-digit standardised bank account number, mandatory for all SPEI transfers. Every Mexican bank account has a unique CLABE. Structure: Digits 1–3 identify the bank, digits 4–6 identify the city/plaza, digits 7–17 are the account number (11 digits), and digit 18 is a check digit. CLABE check digit algorithm: Multiply each of the first 17 digits by the repeating weight sequence 3, 7, 1, sum all products, take the result modulo 10, subtract from 10, and take modulo 10 again. Major CLABE bank codes: 002/012 = BBVA México, 014 = Santander MX, 021 = HSBC México, 072 = Banorte, 058 = Banregio, 646 = STP (fintech/SPEI direct), 006 = Bancomext. qrpayhub.com validates CLABEs automatically and displays the detected bank name.
CLABE: 0 7 2 1 8 0 0 0 1 1 8 3 5 9 4 4 0 1
│ │ │ └─ City (180)
│ │ └─── Bank: 072 = Banorte
│ └─────
└─────── Check digit = 1
Weights: 3 7 1 3 7 1 3 7 1 3 7 1 3 7 1 3 7 (×17)
Sum all (digit × weight) → mod 10 → (10 - x) mod 10| Bank Code | Bank Name | Note |
|---|---|---|
| 002 | BBVA México | Largest private bank |
| 012 | BBVA México (alt) | Legacy code |
| 014 | Santander MX | |
| 021 | HSBC México | |
| 072 | Banorte | Largest Mexican-owned bank |
| 002 | Citibanamex | Uses 002 prefix |
| 058 | Banregio | |
| 059 | Banorte (savings) | |
| 006 | Bancomext | Development bank |
| 646 | STP | Fintech / SPEI direct |
The CoDi QR Payload Format
CoDi QR codes use the BXC:// protocol (Banxico) — a proprietary URL scheme designed specifically for CoDi. The payload structure encodes SPEI transfer parameters as a pipe-delimited string: BXC://SPEI?data=SPEI|[version]|[type]|[clabe_or_phone]|[amount]|[concept]|[reference]|[name]. Fields: Protocol (BXC://SPEI, required), version (always 1, required), type (03=CLABE or 10=phone number, required), recipient CLABE (18 digits) or phone (10 digits), amount in MXN (required — always), concepto/concept (1–35 chars URL-encoded, required), referencia/reference (1–7 digit number, required), name (beneficiary name URL-encoded, optional). All text fields must be URL-encoded for the QR payload.
BXC://SPEI?data=SPEI|[version]|[type]|[clabe_or_phone]|[amount]|[concept]|[reference]|[name] Example: BXC://SPEI?data=SPEI|1|03|072180001183594401|150.00|Pago%20factura%20001|1234567|TIENDA%20LA%20PALMA
| Field | Example | Required | Description |
|---|---|---|---|
| Protocol | BXC://SPEI | Required | Banxico CoDi protocol identifier |
| version | 1 | Required | CoDi version (always 1) |
| type | 03 | Required | 03=CLABE, 10=phone number |
| recipient | 072180001183594401 | Required | CLABE (18 digits) or 10-digit phone |
| amount | 150.00 | Required | Amount in MXN (required for CoDi) |
| concepto | Pago factura 001 | Required | Payment concept (1–35 chars, URL-encoded) |
| referencia | 1234567 | Required | Numeric reference (1–7 digits) |
| name | TIENDA LA PALMA | Optional | Beneficiary name (URL-encoded) |
Required Fields – Why Amount is Mandatory
CoDi's requirement for a fixed amount is a deliberate design decision by Banxico. CoDi is a payment collection system (Cobro = Collection), not just a payment routing mechanism. The workflow assumes the merchant has calculated the exact amount and encoded it in the QR — the customer simply scans and confirms. This contrasts with standards like VietQR or PromptPay, which support open-amount QR codes where the payer enters the amount. CoDi's mandatory amount reduces errors and disputes in retail transactions. The Referencia Numérica (1–7 digits) is also required and appears in the SPEI transfer record for both sender and recipient. The Concepto (1–35 characters) describes the payment purpose and also appears in the SPEI record. Common values: 'Pago factura 001', 'Servicio mensual marzo', 'Anticipo pedido 123'.
CoDi vs DiMo – Mexico's Two Systems
In 2023, Banxico launched DiMo (Dinero Móvil) as a complementary instant payment system. DiMo uses phone numbers as proxies for bank account transfers — similar to how India's UPI uses UPI IDs or Brazil's PIX uses CPF/phone. CoDi and DiMo serve different use cases and coexist. CoDi: launched 2019, uses CLABE or phone as identifier, has QR code (BXC:// format) and NFC support, amount is required, best for merchant QR payments, similar to PromptPay/VietQR. DiMo: launched 2023, uses phone number proxy, no QR code (phone-number based), flexible amount, best for P2P transfers, similar to PIX/UPI. Both systems settle through SPEI infrastructure.
| Feature | CoDi | DiMo |
|---|---|---|
| Launch year | 2019 | 2023 |
| Identifier | CLABE or phone number | Phone number (proxy) |
| QR code | Yes (BXC:// format) | No QR – phone-number based |
| NFC support | Yes | No |
| Amount | Required | Flexible |
| Best for | Merchant QR payments | P2P transfers |
| Analogy | Similar to PromptPay / VietQR | Similar to PIX / UPI |
| Settlement | SPEI | SPEI |
Supported Banks
All SPEI-participant banks in Mexico are obligated to support CoDi. As of 2025, this includes over 50 commercial banks, development banks, and fintech institutions licensed to operate in Mexico. Major banks with CoDi support: BBVA México (BBVA México App), Santander MX (Santander México), Banorte (Banorte Móvil), HSBC México (HSBC México App), Citibanamex (Citibanamex Móvil), Scotiabank MX (Scotia en Línea), Inbursa (Inbursa Móvil), BanBajío (BanBajío Móvil). Digital wallets/fintech: Mercado Pago MX (Mercado Pago), Spin by OXXO (Spin App). Coverage represents 99%+ of Mexican bank accounts.
BBVA México
BBVA México App
Santander MX
Santander México
Banorte
Banorte Móvil
HSBC México
HSBC México
Citibanamex
Citibanamex Móvil
Scotiabank MX
Scotia en Línea
Inbursa
Inbursa Móvil
BanBajío
BanBajío Móvil
Mercado Pago
Mercado Pago MX
Spin by OXXO
Spin App
Mexico's Digital Payment Evolution
Mexico's digital payment journey began with SPEI in 2004 — one of Latin America's first real-time interbank systems. For over a decade, SPEI was a business and high-value payment tool. CoDi in 2019 brought SPEI to everyday retail by wrapping it in a QR code interface. CoDi adoption has been slower than comparable systems in Brazil (PIX) or India (UPI), constrained by the requirement for a SPEI-enrolled bank account and competition from Mercado Pago's own QR payment system. DiMo's launch in 2023 addressed key limitations by enabling phone-number-based transfers without needing to know the recipient's CLABE. Together, CoDi (QR merchant payments) and DiMo (P2P transfers) form a complete instant payment system comparable to Brazil's PIX. For businesses operating in Mexico, CoDi offers zero-fee payment acceptance with universal bank coverage — no card terminal, no payment gateway fees.
Ready to generate your CoDi QR Code?
Free, instant, works with all Mexican banks via SPEI.