How CoDi Works – Mexico's Digital Payment Guide
Everything about CoDi: CLABE accounts, the SPEI infrastructure, BXC:// QR 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. This makes CoDi particularly suitable for merchant checkouts and invoicing.
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 without a QR code.
- 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, so CoDi payments are available at any time.
- 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. The structure is:
- Digits 1–3: Bank code (identifies the institution)
- Digits 4–6: City/plaza code
- Digits 7–17: Account number (11 digits)
- Digit 18: Check digit (calculated via weighted algorithm)
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. This gives the 18th check digit. qrpayhub.com validates CLABEs automatically using this algorithm and displays the detected bank name from the first 3 digits.
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 by Banxico 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] 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, since both parties see the same figure before the transfer is authorised.
The Referencia Numérica (1–7 digits) is also required and appears in the SPEI transfer record for both sender and recipient. Businesses should use invoice numbers, order IDs, or folio numbers as the reference for automated reconciliation. Random or sequential numbers work for small merchants.
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.
| 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.
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). Banxico mandated bank support, but adoption by consumers and merchants has been constrained by the requirement for a SPEI-enrolled bank account(excluding many of the unbanked) and competition from Mercado Pago's own QR payment system, which reached millions of users through marketplace integration.
DiMo's launch in 2023 addressed one key limitation by enabling phone-number-based transfers without needing to know the recipient's CLABE. DiMo has grown faster than CoDi, with major banks enrolling millions of users in the first year. 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 a zero-fee payment acceptance option with universal bank coverage — no card terminal, no payment gateway fees. Combined with SPEI's 24/7 availability and proven infrastructure, CoDi is an increasingly attractive option for Mexican merchants and B2B payment collections.
Ready to generate your CoDi QR Code?
Free, instant, works with all Mexican banks via SPEI.
Open Generator →