API v5 documentation
With the API v5 your system stamps, queries, sends and cancels CFDI 4.0 with a single key. Each page has the request, the response and the errors it can return, checked against the code running in production.
Base URL
Every path in this documentation starts from one of these two URLs. The sandbox is free and stamps with a test provider: CFDIs issued there have no tax validity.
| Environment | Base URL |
|---|---|
| Production | https://app.facturadigital.com.mx/api/v5 |
| Sandbox | https://sandbox-app.facturadigital.com.mx/api/v5 |
Get started
- QuickstartYour first CFDI in the sandbox with curl: the key, the request and the response.
- Keys and environmentsHow to send the X-Api-Key, the production and sandbox URLs, and why each environment has its own key.
- Responses and errorsHow to read code and message, which errors to retry and which to fix first.
- All endpointsEvery API v5 endpoint in one table.
Stamp
- Create a CFDIStamp an invoice, credit note, payment receipt or payroll by sending the voucher as JSON.
- Stamp sealed XMLIf your system already builds and seals the XML, send it in Base64 or as a file and we only stamp it.
- WithholdingsWithholding and payment information certificates 2.0, and how to cancel them.
- Payment complementGuide to the electronic payment receipt (Pagos 2.0) with installments and several invoices.
- Carta Porte 3.1Guide to income and transfer CFDIs with the Carta Porte 3.1 complement.
After stamping
Self-invoicing and catalogs
Errors
Tools
- JSON validatorPaste your JSON and check it against the SAT rules before stamping.
- Examples by languageStamp a CFDI in curl, PHP, Node.js, Python, C# and Java.
- Postman collectionImport the official collection with every endpoint ready to try.
- SandboxThe free test environment, with the same API as production.
Checked against the production API v5 on 2026-11-03.