Definicja
CFDI (Comprobante Fiscal Digital por Internet) is the electronic invoice format used in Mexico. Since 2014, all tax-valid invoices must be CFDIs. The current version is CFDI 4.0, which came into force on 1 January 2023 after a phased transition.
How it works: the seller generates an XML containing the invoice data, signs it with a digital certificate (CSD — Certificado de Sello Digital) issued by the SAT, and submits it to an authorised PAC (Proveedor Autorizado de Certificación). The PAC validates the XML, stamps it with a unique UUID (folio fiscal) and the SAT's digital seal, and returns the stamped CFDI. Only stamped CFDIs are fiscally valid.
Mandatory fields include: issuer name, RFC (tax ID), fiscal regime, ZIP code; recipient name, RFC, ZIP code, CFDI use code; currency and exchange rate; product/service code (SAT catalogue); unit code; description; quantity and unit price; VAT (IVA) and other taxes; UUID and SAT seal.
There are several CFDI types for different transactions: Ingreso (sale), Egreso (credit note / refund), Traslado (movement of goods), Pago (payment receipt), Nómina (payroll).
For accounting and payment records, a human-readable PDF (representación impresa / DANFE-like layout) is usually produced from the XML, but the XML is the legal document.