Overview
A valid CFDI 4.0 is composed of several sections with clear responsibilities. Here is the structure from top to bottom.1. Receipt header
Contains the global attributes of the CFDI:2. Issuer
3. Receiver
Rfc, Name, and FiscalRegime, two additional required fields must be provided for the receiver: CfdiUse and TaxZipCode.
4. Line items (Items)
The list of goods or services being billed:5. Taxes
Taxes are declared per line item and added to the receipt total:6. Original String and Digital Seal
Before sending it to the PAC, the XML goes through a cryptographic process:- Original String: ordered concatenation of the CFDI fields in plain-text format (defined by the SAT in its XSLT)
- SHA-256 hash: cryptographic digest of the original string
- Digital Seal: the hash signed with the private key of the issuer’s CSD (RSA)
7. Fiscal Digital Stamp
Once the PAC validates the XML, it adds the Fiscal Digital Stamp as a complement:The UUID is the most important value for invoice tracking. Always store it
alongside the invoice. With it you can verify the CFDI on the SAT portal or
initiate a cancellation.