Mexico's CFDI: every invoice is stamped XML, and 4.0 checks the customer too
In Mexico, per the guides read, a tax invoice is a CFDI: an XML file that a SAT-authorised provider (a PAC) validates, stamps with a unique folio and reports to the tax authority before it counts. Version 4.0 requires the customer's RFC, exact legal name, postal code and tax regime. Below: how it works as vendor guides report it, where sources disagree, and a local check of an RFC's check digit.
How it works (as vendor guides report it)
| Step | What happens |
|---|---|
| Issue | The issuer builds the CFDI XML (version 4.0, with complements such as payment or transport where they apply) and signs it with its tax certificate. |
| Stamp | A PAC validates it against SAT's rules and catalogues, adds the digital stamp and the UUID folio, and reports it to SAT. Without the stamp it is not a valid invoice. |
| Deliver | The issuer sends the stamped XML (and usually a PDF) to the customer, who needs the XML to deduct the expense. |
| Cancel | Cancelled with a reason code; for some cases the customer must accept. Replacing a CFDI points to the new one's folio. |
Where it is unsettled: the dates of the 3.3 to 4.0 transition (search results disagreed on the start and on the grace period), the cancellation thresholds and time limits, and which complements are required for which sale. These are vendor blogs, not SAT or the Resolución Miscelánea Fiscal. No penalty is stated because none was read. A summary, not tax advice.
Check an RFC
Tests the length (12 for a company, 13 for a person), the letters, the YYMMDD date part and the check digit. It does not look anything up, so it cannot say whether the RFC is registered or matches a name. The two generic RFCs for sales to the public and to foreigners are accepted by shape. The check digit misses about 16% of single-character mistakes (60 of 385 on a sample company RFC), so a pass is not a confirmation.
The sample is SAT's own RFC. The check-digit rule (mod 11, weights 13 down to 2) reproduces four RFCs I know; it was not read from SAT's specification.
What this checker does and does not cover
The main checker reads UBL, CII and Factur-X and applies EN 16931 and Peppol rules. It does not read the CFDI XML, has no SAT catalogue (product and unit keys, tax regimes, CFDI uses), cannot check a stamp and does not know the PAC's own rules. Treat the RFC test here as a typo catch only.
Test a file before you send it
For a European or Peppol invoice, open the checker, drop your XML and read the findings, each with a rule ID and a fix (the rule reference). No account, nothing uploaded. No invoice yet? The e-invoice creator turns a form into UBL or CII XML and checks it. Other countries: all side by side Japan the UAE Saudi Arabia India Malaysia Turkey Sweden.
Common questions
What is a CFDI?
A CFDI (Comprobante Fiscal Digital por Internet) is Mexico's electronic tax invoice: an XML file the issuer sends to a PAC (a provider authorised by the tax authority, SAT), which validates it, adds a digital stamp with a unique folio (UUID) and reports it to SAT. A PDF is only a printed representation of the XML. This is a summary from vendor guides, not advice; confirm with SAT or your accountant.
What does CFDI 4.0 require about the customer?
Vendor guides report that version 4.0 makes the receptor block required: the customer's RFC, legal name as it appears on their tax-status certificate, postal code of their tax address and tax regime, plus the CFDI use code. A name or postal code that does not match SAT's record is reported as a reason the PAC rejects the stamp. Sources differ on the dates of the transition from 3.3, so confirm the dates with SAT.
How does cancelling a CFDI work?
As vendor guides report it, a CFDI is cancelled with one of four reason codes, and for some cancellations the receptor must accept the request, with a window of a few business days after which it is treated as accepted. Substitution points to the folio of the replacing CFDI. The exact rules, amount thresholds and time limits are in SAT's rules and were not read here.
Can this checker validate a Mexican CFDI?
No. It reads UBL, CII, Factur-X and JSON, not the CFDI XML schema, and has no SAT catalogue rules or stamp check. It does test an RFC's shape, date part and check digit on this page, and a clean result is not an acceptance by a PAC or SAT.
Open the E-invoice Preflight checker to validate your own invoice file.
More countries
Australia Austria Belgium Brazil Bulgaria Croatia Cyprus Czech Republic Denmark Estonia Finland France Germany Greece Hungary Ireland Italy Latvia Lithuania Luxembourg Malta Netherlands Nigeria Norway Poland Portugal Romania Serbia Singapore Invoicenow Slovakia Slovenia Spain Switzerland Uk Colombia Chile Peru Argentina Uruguay Paraguay Ecuador Indonesia Vietnam