Cretia
← Back to blog

CFDI in Mexico: what it is, what it means, how it works

By Montserrat Devars

Published

Updated

Close-up of a tablet held in both hands in a bright office.

A CFDI (Comprobante Fiscal Digital por Internet, literally "digital tax receipt over the internet") is Mexico's official electronic invoice. It is an XML file that records a transaction (seller, buyer, items, amounts and taxes) and carries two digital seals: the issuer's and that of the SAT (Servicio de Administración Tributaria), Mexico's federal tax authority. In Mexico it is the CFDI, not a PDF or a paper invoice, that supports revenue, deductions and VAT credits.

This guide explains in plain English what the acronym means, what a CFDI is for, what it contains, the types that exist, how one is issued under the current version 4.0, and what changes when one side of the transaction is a foreign company. It is general guidance, not tax advice.

What CFDI means

Each word of the name describes the document:

  • Comprobante (receipt): it proves that a transaction took place, whether a sale, a payment received, a salary payment or a tax withholding.
  • Fiscal (tax): it has effects before the SAT. The rules are in articles 29 and 29-A of the Código Fiscal de la Federación (CFF), Mexico's Federal Tax Code (official text, in Spanish).
  • Digital: it is born as an electronic XML file, not on paper.
  • Por Internet (over the internet): before it reaches the customer it is sent online to the SAT or to an authorized provider, which validates and certifies it.

In everyday speech Mexicans say CFDI, factura electrónica (electronic invoice) and factura (invoice) interchangeably. Every invoice issued in Mexico today is a CFDI, but not every CFDI is a sales invoice: payslips and payment receipts are CFDIs too. The plural you will see is CFDIs or, in Spanish, los CFDI.

What a CFDI is used for

A CFDI leaves a tax record of a transaction for both parties and for the SAT:

  • For the issuer, it fulfils the legal obligation to issue a receipt for its sales, activities and income, and documents the revenue and the taxes charged.
  • For the recipient, it supports deductions and the VAT (IVA) it credits. Article 29-A of the CFF states that amounts covered by receipts that do not meet the requirements cannot be deducted or credited.
  • For the SAT, it reports the transaction: the provider that certifies the CFDI sends it to the SAT at that same moment.
  • It also documents payroll, tax withholdings, payments received after invoicing and the transport of goods.

An example: a designer charges 10,000 pesos plus 16% VAT for a project and issues an income CFDI for 11,600 pesos (ignoring withholdings). For her it documents the revenue and the 1,600 pesos of VAT charged; for her customer it supports the expense deduction and the VAT credit, provided the other legal requirements are met.

Who has to issue a CFDI

Article 29 of the CFF requires taxpayers to issue CFDIs whenever the tax laws oblige them to issue receipts for their acts or activities, for income they receive or for taxes they withhold. The same article requires whoever buys goods, receives services, rents an asset or has tax withheld to request one.

To issue, a taxpayer needs three things: registration in the RFC (Registro Federal de Contribuyentes, the federal taxpayer registry) with tax obligations on file, a valid e.firma (the SAT's advanced electronic signature) and a CSD (Certificado de Sello Digital, a digital seal certificate used only to sign invoices); individuals may use their e.firma instead of a CSD in the SAT's free Genera tu factura tool (rule 2.2.8). How the RFC tax ID is built is covered in RFC and homoclave.

What a CFDI contains

The contents of a CFDI are the requirements of article 29-A of the CFF:

  • The issuer's RFC, name and tax regime (régimen fiscal). The regimes are explained in tax regimes in Mexico.
  • The folio number, the SAT's digital seal and the issuer's digital seal. The folio fiscal is a 36-character UUID that identifies the invoice uniquely.
  • Place and date of issue.
  • The recipient's RFC, name and the postal code of its tax address, plus the code for the use the recipient will give the invoice (uso de CFDI), for example G03, Gastos en general (general expenses). See CFDI use for the full catalog.
  • Quantity, unit of measure and type of goods, or a description of the service, using the SAT's catalog codes.
  • Unit price and total amount, with the taxes charged broken down by rate and any taxes withheld.
  • Whether it is paid in a single payment or not (método de pago) and how it was paid (forma de pago: cash, transfer, card and so on).
  • It must cover transactions that exist and are real. A CFDI that does not is considered false for the purposes of the CFF.

All of this lives in the XML, which is the invoice. The PDF is only its printed representation: under article 29, section V, of the CFF it merely presumes that the CFDI exists. Always ask a Mexican supplier for the XML, not just the PDF.

Types of CFDI

The receipt type field (tipo de comprobante) accepts five codes:

  • I, Ingreso (income): the invoice for a sale of goods or services.
  • E, Egreso (expense): the credit note for returns, discounts or rebates.
  • T, Traslado (transfer): covers the movement of goods, usually with the Carta Porte (bill of lading) supplement.
  • N, Nómina (payroll): the payslip for wages and salaries.
  • P, Pago (payment): the receipt issued when an invoice that was not paid in a single payment is collected, with the payment supplement (complemento para recepción de pagos).

Separately there is the withholdings CFDI (CFDI de retenciones e información de pagos), a different document with its own standard. Supplements (complementos) are extra blocks of data the SAT publishes for specific sectors or activities, such as payroll, payments, Carta Porte and foreign trade.

How a CFDI is issued: sealing and stamping (timbrado)

Issuing a CFDI takes four steps:

  • The issuer enters the customer and transaction data in its invoicing software, which builds the XML.
  • The software signs the XML with the issuer's CSD. That seal proves authorship.
  • The XML is sent to a PAC (Proveedor Autorizado de Certificación, a certification provider authorized by the SAT), which validates the requirements, assigns the folio fiscal and adds the SAT's digital seal. This certification is called timbrado, or stamping.
  • The issuer delivers the XML to the customer and, on request, the printed representation.

The PAC rejects the invoice if more than 72 hours pass between the date it was generated and the moment of certification (rule 2.7.2.9 of the Resolución Miscelánea Fiscal for 2026, the SAT's annual rulebook, in Spanish). Taxpayers who do not want to pay for software can issue without a PAC through the SAT's free tools, Genera tu factura on the SAT portal and the Factura SAT Móvil app (rule 2.7.1.6).

CFDI 4.0, the current version

The technical standard for the CFDI is Anexo 20 (Annex 20) of the Resolución Miscelánea Fiscal. The SAT states on its Anexo 20 page (in Spanish) that version 4.0 has been in use since January 1, 2022 and that since April 1, 2023 it is the only valid version. Its main changes from version 3.3:

  • The recipient's name is mandatory.
  • The recipient's tax regime and the postal code of its tax address were added as mandatory fields.
  • An Exportación (export) field was added.
  • An Objeto del impuesto (subject to tax) field was added to each line item.
  • Periodicidad, Meses and Año (period, months, year) were added for global invoices to the general public.

In practice, the recipient's RFC, name and postal code must match what the SAT has on file. If they do not, the PAC will not stamp the invoice.

CFDI for foreign companies

What applies to you depends on which side of the transaction you are on and whether you are registered with the SAT:

  • You buy from a Mexican supplier and are not registered in the RFC. The supplier still issues a CFDI. Rule 2.7.1.23 provides the generic RFC XEXX010101000 for residents abroad, and the SAT's filling guide tells the issuer to use tax regime 616, Sin obligaciones fiscales (no tax obligations), and CFDI use S01, Sin efectos fiscales (no tax effects). The fields for country of tax residence and foreign tax ID number can carry your details.
  • You sell to a Mexican customer from abroad, with no permanent establishment in Mexico. You cannot issue a CFDI without the RFC registration, e.firma and CSD described above, so you send your own invoice. Rule 2.7.1.14 lets your customer deduct or credit based on it if it shows your name, address and tax ID number if you have one, place and date of issue, the customer's RFC and name, a description of the goods or service, the unit price and the total. For sales or leases of goods carried out in Mexico it must also break down the taxes charged and withheld, or your customer attaches the CFDI it issues for the taxes it withheld from you.
  • You operate through a Mexican entity. The entity registers in the RFC, obtains its e.firma and CSD and issues CFDIs like any other Mexican taxpayer, including payroll CFDIs for its employees.

After issuing: cancel, verify, keep

A CFDI with an error cannot be edited. It is cancelled and, if the transaction stands, replaced by a new one. Article 29-A of the CFF allows cancellation no later than the month in which the annual income tax return for the year of issue is due, and provided the recipient accepts; SAT rules list cases where acceptance is not needed.

Anyone who receives a CFDI can check that it is authentic on the SAT's free verification service: the steps are in how to validate a SAT invoice. Both issuer and recipient should keep the XML. Invoices are part of the accounting records, which article 30 of the CFF requires taxpayers to keep, as a general rule, for five years from the date the related return was or should have been filed.

With Cretia's invoicing module you prepare CFDI 4.0 invoices and get the XML and PDF to share with your customer. Cretia is not a PAC: a certified PAC stamps the CFDI.

FAQ

What does CFDI stand for?

CFDI stands for Comprobante Fiscal Digital por Internet, which translates as digital tax receipt over the internet. It is the legal name of the electronic invoice in Mexico: an XML file with the transaction data, the issuer's digital seal and the SAT's digital seal.

Is a CFDI the same as an invoice?

In practice, yes: every invoice issued in Mexico today is a CFDI. The term is broader, though. Payslips, credit notes, transfer documents and payment receipts are also CFDIs.

What is the "uso de CFDI" on a Mexican invoice?

Uso de CFDI (CFDI use) is a mandatory code on every invoice that states what the recipient will use it for, such as G03, Gastos en general (general expenses). The recipient chooses it, and it must be compatible with the recipient's tax regime.

Can a foreign company receive or issue a CFDI?

A foreign company with no Mexican tax registration can receive one: the supplier uses the generic RFC XEXX010101000 with tax regime 616 and CFDI use S01. To issue CFDIs, a company needs to be registered in the RFC and hold an e.firma and a digital seal certificate (CSD).

What is the current version of the CFDI?

Version 4.0. According to the SAT, it has been in use since January 1, 2022 and has been the only valid version since April 1, 2023.

How do I check that a CFDI is real?

Use the SAT's free verification service at verificacfdi.facturaelectronica.sat.gob.mx. Enter the folio fiscal (UUID), the issuer's RFC and the recipient's RFC, or upload the XML file, and the service tells you whether the invoice is registered with the SAT.

Continue to Cretia’s Electronic invoicing module

Simplify your business with Cretia

Invoicing, CRM, accounting and more. All in one platform.

Start for free