Extract data from Mexican CFDI revenue invoices
A CFDI is not valid in Mexico until the tax authority has stamped it. The Comprobante Fiscal Digital por Internet is issued under a clearance model: before a seller can hand an invoice to a buyer, an authorised certification provider (a PAC, Proveedor Autorizado de Certificacion) validates it and the Servicio de Administracion Tributaria (SAT) returns a Folio Fiscal, the 36-character UUID that lives in the Timbre Fiscal Digital complement and is the only thing that makes the document fiscally real. A CFDI de Ingreso, document type I, is the revenue invoice a business raises for a sale, and it carries far more than a commercial invoice: the issuer and recipient federal taxpayer registry codes (RFC), each party tax regime from the c_RegimenFiscal catalog, the recipient use code from c_UsoCFDI, and the SAT product and service code on every line. Accounting and tax teams reconcile the stamped invoice against what the SAT already holds, so the UUID and the RFC pair matter as much as the amount. The catalog codes are the substance of a CFDI 4.0. Every concepto names a ClaveProdServ product code and a ClaveUnidad unit code, and an ObjetoImp tax-object flag that says whether the line is subject to tax. The recipient block, tightened in CFDI 4.0, requires the receptor legal name, the tax-domicile postal code, and the tax regime to match the SAT registry exactly, or the stamp is refused. Transferred taxes carry a c_Impuesto code where 002 is IVA (value-added tax), 001 is ISR, and 003 is IEPS, each with a TipoFactor and a rate, and the payment method is PUE for a single exhibition or PPD for deferred instalments. When the currency is not the peso the exchange rate to MXN is stated so the SAT can value the operation. Talonic reads the stamped CFDI, whether the printed representation or the source PDF, into a structured record that keeps every fiscal identifier. An invoice numbered A-4471 from Distribuidora del Bajio, S.A. de C.V. (RFC DIS200115QX4, regime 601) to Industrias Norte, S.A. de C.V. (RFC IND160822AB1), stamped 2026-06-15 under Folio Fiscal A7B3C1D2-4E5F-6A7B-8C9D-0E1F2A3B4C5D, returns its two conceptos, a 16% IVA of 29,360.00 MXN, and a total of 212,860.00 MXN that a Mexican accounting system posts against the SAT record.
What gets extracted from Mexican CFDI revenue invoices
How extraction works for Mexican CFDI revenue invoices
A CFDI reaches an accounting team as the printed representation, the source PDF, or a portal export, and the certification stamp and catalog codes still have to be recovered from it. Talonic classifies the document and binds every value to the SAT CFDI 4.0 field set held in the Field Registry, so the Folio Fiscal UUID, the stamp timestamp, the issuer and recipient RFC, each party regime from c_RegimenFiscal, and the c_UsoCFDI use code resolve regardless of layout. Each concepto keeps its ClaveProdServ product code, ClaveUnidad unit, quantity, unit price, and ObjetoImp tax flag, transferred taxes are typed by their c_Impuesto code with 002 for IVA at its rate, and the payment method is read as PUE or PPD. The subtotal, transferred and withheld taxes, and the total are reconciled, and the exchange rate to MXN is kept when the currency is not the peso. Per-value confidence and a pixel-region pointer under DIN SPEC 91491 let a tax accountant verify a UUID or an RFC against the source before posting. The extraction structures what the stamped CFDI states and does not compute the tax owed or re-validate the SAT stamp.
Sample extraction
A stamped CFDI 4.0 de Ingreso with two conceptos
{
"document_number": "A-4471",
"document_series": "A",
"document_date": "2026-06-15T10:32:00",
"cfdi_version": "4.0",
"document_type": "I",
"currency": "MXN",
"place_of_issue_postal_code": "37000",
"payment_form": "03",
"payment_method": "PUE",
"supplier.tax_id": "DIS200115QX4",
"supplier.name": "Distribuidora del Bajio, S.A. de C.V.",
"supplier.tax_regime": "601",
"buyer.tax_id": "IND160822AB1",
"buyer.name": "Industrias Norte, S.A. de C.V.",
"buyer.tax_postal_code": "64000",
"buyer.tax_regime": "601",
"cfdi_use": "G01",
"subtotal_amount": 183500,
"tax_amount": 29360,
"total_amount": 212860,
"fiscal_folio_uuid": "A7B3C1D2-4E5F-6A7B-8C9D-0E1F2A3B4C5D",
"stamp_timestamp": "2026-06-15T10:33:12",
"certification_provider_tax_id": "SPR190613I52",
"conceptos": [
{
"clave_prod_serv": "43211508",
"item_id_sku": "LAP-14",
"quantity": 10,
"unit_code": "H87",
"description": "Computadoras portatiles 14 pulgadas",
"unit_price": 18000,
"line_amount": 180000,
"tax_object": "02"
},
{
"clave_prod_serv": "43212104",
"item_id_sku": "MOU-01",
"quantity": 10,
"unit_code": "H87",
"description": "Mouse inalambrico",
"unit_price": 350,
"line_amount": 3500,
"tax_object": "02"
}
],
"impuestos": [
{
"impuesto": "002",
"tipo_factor": "Tasa",
"tasa_o_cuota": "0.160000",
"importe": 29360
}
]
}Frequently asked
What is the Folio Fiscal, and does the extractor read it?
The Folio Fiscal is the 36-character UUID the SAT returns through the Timbre Fiscal Digital complement when an authorised provider (PAC) stamps the invoice; it is what makes a CFDI fiscally valid. It is captured along with the stamp timestamp and the certification provider RFC, so the document can be reconciled against the SAT record.
Which party and catalog fields come out?
The issuer and recipient RFC, each party tax regime from the c_RegimenFiscal catalog such as 601, the recipient tax-domicile postal code and CFDI use from c_UsoCFDI such as G01, all tightened in CFDI 4.0, and every concepto with its ClaveProdServ product code and ObjetoImp tax flag.
How are the taxes and totals handled?
Transferred taxes are typed by their c_Impuesto code, with 002 for IVA at its stated rate, alongside any withheld taxes, and the subtotal, tax, and total are reconciled so a CFDI whose conceptos do not foot to its total is flagged. The exchange rate to MXN is kept when the currency is not the peso.
Does it validate the SAT stamp or compute the tax owed?
No. Talonic structures what the stamped CFDI states and links each value to its place on the document. Re-validating the stamp against the SAT and determining the tax owed are outside the extraction.
Ready to extract from your own Mexican CFDI revenue invoices?
Author note
Reviewed by Talonic engineering · last reviewed 2026-07-07