Standards/codi
CoDi
Overview
CoDi (Cobro Digital, "Digital Charge") is Mexico's central-bank-operated QR/NFC payment system, launched by Banco de México (Banxico) in September 2019 [1, 2, mx-cro]. It is a thin layer over the existing SPEI (Sistema de Pagos Electrónicos Interbancarios) instant-payment rail — Mexico's interbank settlement system since the early 2000s MX. CoDi enables merchant-presented QR codes, NFC payments, and push-notification payment requests, all settling instantly via SPEI [3].
CoDi's defining context is the gap between its ambitious launch goals and slower-than-projected adoption. As of 2024 it processes ~17 million transactions per year (+23 % YoY) MX — meaningful growth but far below the early projections of tens of millions of users by 2020. The structural reasons trace to Mexico's banking-access (only ~8 % of population had CoDi accounts as of mid-2020s) and the dominance of cash in Mexican commerce (80 %+ of business transactions in cash) [3].
Banxico complemented CoDi in 2023 with DiMo (Dinero Móvil) — a phone-number-based instant transfer service, also riding SPEI rails MX.
History
Background — SPEI rail (foundational) [mx-cro, 4]:
- SPEI (Sistema de Pagos Electrónicos Interbancarios) is Banxico's instant-payment system, operating since the early 2000s.
- 2024 SPEI volume: 5.34 billion transactions, 219 trillion pesos (6.51× Mexico's GDP).
- SPEI is real-time, 24/7, and is the foundation that CoDi (and later DiMo) layer on.
Pre-launch — April 2019 pilot [3]: Banxico ran a pilot starting April 2019 with employees of financial institutions including BBVA Bancomer, Citibanamex, Santander, Banorte, Banregio and Fincomun. The pilot tested the QR code generation, mobile app integration with bank systems, and SPEI settlement.
September 2019 — Public launch [3, mx-cro]: CoDi went live nationally. Banxico promoted it heavily as a financial-inclusion play — bringing the unbanked into digital payments via cheap-or-free merchant-presented QR codes.
Adoption trajectory [3, mx-cro]:
- End 2019 — Initial projections estimated 18.1 million registered users and ~28 million transactions by mid-2020.
- September 2020 (~1 year post-launch) — Reality: 10.7 million validated accounts; 2.9 million operations. Significantly below projections.
- 2024 — 17 million CoDi transactions (annual); 23 % YoY growth MX
- 2024 — Electronic transfer usage grew from 8.2 % (2021) to 23.7 % of population (2024) — broader digital-payment growth even if CoDi itself underperformed MX
2023 — DiMo launch MX: Banxico introduced DiMo as a phone-number-based instant transfer service. By May 2024 DiMo had 7 million+ registered accounts. DiMo and CoDi are complementary — both ride SPEI.
2025 — Digital peso CBDC pilot MX: Banxico is preparing a digital peso central bank digital currency pilot for 2025. The CBDC could eventually integrate with or extend CoDi.
Technical specification
CoDi is layered on SPEI rather than being a new rail [3, mx-cro]:
| Layer | Description |
|---|---|
| Underlying rail | SPEI (Sistema de Pagos Electrónicos Interbancarios) — Banxico's instant-payment system |
| CoDi messaging | QR codes, NFC, or push notifications carry the payment-initiation request |
| Settlement | Real-time via SPEI; 24/7/365 |
| Cost | Free for individuals; very low for merchants |
Three interaction modes [3, mx-cro]:
| Mode | Description |
|---|---|
| QR Code | Merchant displays a QR code (static or dynamic); customer scans with their bank's mobile app to pay |
| NFC | Customer taps phone (NFC-equipped) against merchant's NFC-equipped device |
| Push notification (Internet) | Merchant sends a payment-request notification to the customer's bank app; customer confirms |
Standards alignment: The CoDi QR is Banxico-proprietary in structure rather than EMVCo MPM aligned [3] — a notable difference from most national QR standards launched in the same era (SGQR, DuitNow QR, PromptPay, QRIS, VietQR, JPQR all adopted EMVCo MPM). This decision reflects Banxico's anchor in SPEI rather than in card-network EMVCo standards.
Banxico API security and environments [6, 11]:
- Authentication uses RSA digital signatures on every request — participating banks/PSPs provision a key pair with Banxico and sign payment-request JSON before it reaches the CoDi endpoints.
- Two deployment environments are provided: Beta (test/sandbox) and Production — both addressed under the same base API contract, with a fallback architecture across multiple Banxico endpoints for resilience.
- Banxico's CoDi documentation is gated behind a developer-onboarding process tied to a Mexican financial-institution identity; the protocol is "open" only in the sense that it is specified, not freely accessible.
Key API operations (documented from the community client portfedh/codi-api) [6]:
| Operation | Purpose |
|---|---|
POST /v2/codi/qr |
Generate a dynamic CoDi QR payment request |
POST /v2/codi/push |
Send a payment-request push notification to a customer's banking app via phone number |
POST /v2/codi/consulta |
Query the status of a pending CoDi payment |
POST /v2/resultadoOperaciones |
Receive Banxico webhook callbacks with operation results |
Account requirements [3]:
- A Mexican bank account at a participating institution (essentially all major Mexican banks).
- A CoDi-enabled mobile banking app (CoDi Banxico standalone app exists for non-bank-app users [5]).
- A registered phone number linked to the account.
- Merchant generates payment request (in their POS app or banking app); produces QR code, NFC token, or push notification.
- Customer's banking app receives or scans the request.
- Customer reviews amount and merchant details, confirms.
- SPEI settles the transfer instantly.
- Both parties receive confirmation.
Use cases
CoDi targets financial-inclusion-oriented merchant payments, with the explicit goal of bringing unbanked / underbanked Mexicans into digital payments [3, mx-cro]:
- Small merchant payments — markets, taquerías, street vendors, neighbourhood stores. The cost-free transaction model is the policy lever.
- Bill payments — utility companies, telecom, government services via CoDi-compatible request notifications.
- P2P transfers — though DiMo (2023) is increasingly the primary P2P tool, layered on the same SPEI rail.
- E-commerce checkout — some Mexican e-commerce sites accept CoDi as a payment option.
- Government disbursement — pilot programmes for social-benefit payments.
Adoption challenges that limit use [3, mx-cro]:
- Smartphone penetration — CoDi requires a smartphone; ~half the Mexican population at launch had compatible devices.
- Cash dependency — 80 %+ of Mexican business transactions remain in cash, especially in informal sectors.
- Banking access — only ~8 % of the population had registered CoDi accounts as of mid-2022. Many Mexicans don't have bank accounts at all (the financial-inclusion target audience).
- Trust building — CoDi adoption requires consumers to trust digital payment with their bank accounts.
- Merchant onboarding friction — although CoDi is free, merchant onboarding still requires a Mexican bank account and a CoDi-enabled app.
- Competition from established players — Mexican consumers use OXXO (the largest convenience store chain) cash-payment vouchers for e-commerce, which is friction-laden but works for the unbanked.
Where CoDi works best [3]: Larger urban consumers with bank accounts and smartphones who are looking for a free alternative to card-network fees for merchant payments. The original financial-inclusion target audience (unbanked Mexican workers) has been harder to reach.
Implementations
CoDi's open-source ecosystem is structurally thin because Banxico operates a closed-registry protocol — every payment-request signature has to be made with a Banxico-issued RSA key pair, so library implementations only become useful once the user has gone through Banxico's developer onboarding. Unlike EMVCo MPM national QRs, CoDi cannot be generated standalone with a generic encoder.
Community libraries (the only public CoDi-specific code):
| Repo | Language | Stars | License | Status | Notes |
|---|---|---|---|---|---|
| portfedh/codi-api | JavaScript / Express.js | 9 | Apache-2.0 | active (322 commits) | The only public CoDi integration on GitHub. Wraps the four core Banxico endpoints (/v2/codi/qr, /v2/codi/push, /v2/codi/consulta, /v2/resultadoOperaciones), handles RSA-certificate signing, supports both Beta and Production environments, includes webhook receivers and a fallback across Banxico endpoints [6] |
A separate independent tutorial-implementation walkthrough is published by Pablo Cruz at pablocruz.io/codi-api.html [11].
Banxico's own surfaces [2, 5]:
- CoDi Banxico standalone app (Google Play) — for users whose bank app does not yet integrate CoDi natively.
- Banxico CoDi developer documentation — Spanish-language, gated behind a developer-onboarding process; provides the production REST contract, RSA-signing requirements, dual Beta/Production environments and the webhook callback schema [2, 11].
Production bank apps consuming CoDi MX:
- BBVA Mexico (BBVA App)
- Banorte (Banorte Mobile)
- Santander Mexico (Santander App)
- Citibanamex (Citibanamex App)
- HSBC Mexico (HSBC Mobile)
Payment-gateway and acquirer integrations:
- NORBr — provides white-label CoDi payment gateway for international merchants [7].
- STP / DAPP / Conekta / Mercado Pago / Clip — Mexican PSPs that surface CoDi as a payment method alongside cards and OXXO vouchers [12].
Comparison
vs. pix (Brazil) — The defining peer comparison in Latin America. Both are central-bank-operated instant payment systems launched within 14 months of each other (CoDi: September 2019; Pix: November 2020). Both layer QR on an instant payment rail. Pix scaled far faster than CoDi: Pix reached ~70 % adult-population adoption within four years; CoDi reached ~8 % within five. The structural reasons:
| Dimension | CoDi (Mexico) | Pix (Brazil) |
|---|---|---|
| Bank participation | Voluntary | Mandatory for banks with > 500k customers |
| Cost | Free | Free for individuals, ~0.33 % for merchants |
| Underlying rail | SPEI (pre-existing) | New instant payment system |
| QR format | Banxico-proprietary | EMVCo MPM TLV |
| Cash competition | OXXO + cash dominant | Cards + cash, but cards costly |
| Marketing push | Modest | Aggressive |
The mandatory-bank-participation rule was Brazil's structural advantage — Pix had universal bank coverage from day 1, CoDi had to negotiate institution-by-institution [pix-ref, mx-cro].
vs. ASEAN EMVCo MPM family (sgqr, duitnow-qr, promptpay-qr, qris) — Same era, same central-bank-driven pattern, different design choices. CoDi chose Banxico-proprietary QR format; ASEAN peers all chose EMVCo MPM. Cross-border integration is harder for CoDi as a result — no ASEAN-Mexico bilateral QR link exists, partly because of the format mismatch [sg-cro, mx-cro].
vs. upi-qr (India) — Different formats (UPI deep link vs CoDi proprietary), different scale (UPI 250 B vs CoDi 17 M annual transactions), different bank participation models. UPI's open multi-app model (any UPI app can pay any UPI VPA) is more flexible than CoDi's bank-app-mediated approach IN.
vs. DiMo (Mexico's 2023 phone-number-keyed P2P) — Complementary. CoDi is merchant-payment-oriented (QR / NFC / notification); DiMo is P2P-oriented (phone-number-keyed). Both ride SPEI. DiMo's 2023 launch addressed a UX gap in CoDi: many Mexican consumers found CoDi too complex for simple P2P, and DiMo's simpler phone-number model attracted faster adoption (7 M accounts in ~1 year vs CoDi's slower growth) MX.
Fun facts
CoDi launched 14 months before pix but processes ~300× fewer annual transactions [mx-cro, pix-ref] — one of the most dramatic gaps between two seemingly-similar central-bank instant-payment systems launched in the same era. The lesson cited in the central-banking literature: mandatory bank participation matters more than launch-date timing. Brazil's BCB required all major banks to participate in Pix from day 1; Mexico's Banxico made CoDi voluntary, and many banks dragged their feet on integration and consumer marketing.
SPEI processes 6.51 × Mexico's GDP in transaction value annually MX — a remarkable depth metric. Mexico's underlying instant-payment infrastructure (SPEI) is world-class; the gap is in consumer-facing adoption of the CoDi overlay, not in the rail itself. The infrastructure is ready for ~50× CoDi's current usage; the adoption growth limit is consumer behaviour, not technical capacity.
Mexico's cash-dependence is structurally high — 80 %+ of business transactions in cash as of CoDi's launch era [3]. The competing alternative for non-cash digital payment in the unbanked segment is OXXO vouchers: a customer at a Mexican e-commerce checkout selects OXXO, gets a printed barcode, walks to any OXXO convenience store (Mexico's dominant chain), pays cash, and the e-commerce site is notified. This works without a bank account or smartphone — the use case CoDi targeted, but with friction CoDi can't match in cash-only households.
DiMo's faster adoption (7 M accounts in ~1 year) than CoDi's MX is becoming the case study Banxico uses internally: phone-number-keyed P2P is more intuitive than QR-code-keyed merchant payment for the Mexican consumer base. Future Banxico iterations are likely to lean more on DiMo-style identifiers and less on QR scanning.
Status
Active, modest scale, slower than projected [mx-cro, 3]:
- 17 million CoDi transactions annually (2024) — +23 % YoY growth
- Only ~8 % of population has CoDi accounts
- 23.7 % of population uses electronic transfers (broader category, growing fast)
- DiMo complementary at 7 M+ accounts
- SPEI underneath at 5.34 B transactions / 219 T pesos (foundation is robust)
Strategic trajectory MX:
- Digital peso CBDC pilot 2025 — could integrate with or extend CoDi
- SPEI 2.0 — planned upgrades to the underlying rail
- DiMo growth — likely to remain the faster-growing of the two SPEI overlays
- Cross-border — limited; the proprietary QR format constrains regional QR integration
No deprecation planned. CoDi is positioned as part of Banxico's long-term financial-inclusion strategy alongside DiMo and the eventual CBDC; the pace of consumer adoption rather than the technology is the binding constraint.
Sources
- Mexico payment rails — Transfi
- SPEI promise of instant payments — Rebill
- CoDi case study — Mexico Business News
- SPEI 2.0 and digital peso — Mexico Business News
- CoDi Banxico app — Google Play
- portfedh/codi-api — GitHub
- CoDi white-label gateway — NORBr
- Mexico pilots national NFC/QR mobile payments — NFCW
- Banxico rolls out CoDi pilot — Contxto
- SPEI / CoDi how payments work in Mexico — Finofo
- CoDi API integration walkthrough — Pablo Cruz
- CoDi commerce integration — DAPP
- SPEI/CoDi how payments work — Finofo
- MX-mexico.md
Deployments
Found in the following country reports (grep across reports/countries/):
- CO — CO-colombia.md
- MX — MX-mexico.md