Global invoice
A global invoice (factura global, one CFDI that groups a period's sales to the general public) is an income invoice (type I, the regular sales invoice). It covers your sales to the general public (customers who did not ask for their own CFDI) during that period. The SAT (Mexico's tax authority, Servicio de Administración Tributaria) requires you to report all these sales, and the global invoice is how you do it.
Global invoice structure
A global invoice consolidates all of a period's sales to the general public in a single CFDI (Mexico's electronic invoice). Each line item (items) represents one sale, or one tax group of a sale, and its taxes (itemTaxes) are the ones applied to that group.
Invoicing period
The global invoice follows one of the frequencies that the SAT defines in the c_Periodicidad catalog.
| Code | Frequency | Description |
|---|---|---|
| 01 | Diario (Daily) | Sales to the general public for the day |
| 02 | Semanal (Weekly) | Sales to the general public for the week |
| 03 | Quincenal (Semi-monthly) | Sales to the general public for the half-month |
| 04 | Mensual (Monthly) | Sales to the general public for the month |
| 05 | Bimestral (Bimonthly, every two months) | Sales to the general public for the two-month period |
Worked example
Suppose that during a period your business made sales to the general public, like this one:
Sale 0001
| Product | Base price | Taxes | Total |
|---|---|---|---|
| Product A | $100.00 | 16% IVA (Mexico's value-added tax, VAT) | $116.00 |
| Product B | $100.00 | 16% IVA | $116.00 |
| Product C | $100.00 | 16% IVA | $116.00 |
| TOTAL | $300.00 | $48.00 | $348.00 |
Resulting global invoice
Sale 0001 becomes a single line item, with the sale's subtotal as unitPrice and its IVA in itemTaxes:
{
"versionCode": "4.0",
"series": "F",
"date": "2024-05-12T17:20:48",
"paymentFormCode": "01",
"paymentMethodCode": "PUE",
"currencyCode": "MXN",
"typeCode": "I",
"expeditionZipCode": "01160",
"exchangeRate": 1,
"exportCode": "01",
"globalInformation": {
"periodicityCode": "01",
"monthCode": "05",
"year": 2024
},
"issuer": {
"id": "<id-persona-emisora>"
},
"recipient": {
"id": "<id-persona-receptora-con-rfc-generico>"
},
"items": [
{
"itemCode": "01010101",
"quantity": 1,
"unitOfMeasurementCode": "ACT",
"description": "Venta",
"unitPrice": 300.00,
"taxObjectCode": "02",
"itemSku": "0001",
"itemTaxes": [
{
"taxCode": "002",
"taxTypeCode": "Tasa",
"taxRate": 0.160000,
"taxFlagCode": "T"
}
]
}
]
}
Key points of the global invoice
Review these points before you issue a global invoice.
1. Sale-to-line-item relationship
Each sale to the public becomes one line item of the global invoice. Line items represent complete sales, not individual products: in the example, the three products of sale 0001 form a single line item.
2. Tax consolidation
The itemTaxes field of each line item carries the sale's taxes. Fiscalapi calculates all the taxes of a line item on the same base. So a sale with products at different rates, for example IVA at 16% and 0%, takes one line item per tax group, all with the same itemSku. If you invoice the tickets (sales receipts your customers can later turn into CFDIs) from Auto CFDI invoicing, see Global invoice for tickets.
3. Global information
The globalInformation field states which period the invoice covers:
| Field | Description |
|---|---|
periodicityCode | The invoice's frequency, from the c_Periodicidad catalog (see Invoicing period). |
monthCode | The month the global invoice covers. |
year | The fiscal year the global invoice covers. It must be the year of the invoice date (date) or one of the 5 previous years; for example, with date in 2026, from 2021 to 2026. |
An income invoice to XAXX010101000 with the legal name (as registered with the SAT) PUBLICO EN GENERAL must include globalInformation; without it, the SAT rejects the invoice with CFDI40130. If it's missing, or if year doesn't meet the rule above, the endpoint returns a 400 validation failure error on GlobalInformation or GlobalInformation.Year, respectively.
The endpoints that create an invoice and Get an invoice by ID return globalInformation with these three fields, or null if the invoice isn't global. Global invoices stamped (stamping: the certification by a SAT-authorized provider that makes a CFDI valid) before Fiscalapi stored this data also return null, but their stamped XML keeps the global information.
4. Invoice details
| Field | Value |
|---|---|
typeCode | I |
paymentMethodCode | PUE |
exchangeRate | 1 |
currencyCode | MXN |
exportCode | 01 |
5. Recipient details
In either mode of operation, the recipient of the global invoice carries the details of the generic RFC (Mexico's taxpayer ID, Registro Federal de Contribuyentes):
| Field | Value |
|---|---|
| RFC | XAXX010101000 |
| Legal name | PUBLICO EN GENERAL |
Tax regime (régimen fiscal, the SAT category a taxpayer is registered under, such as 601 or 626) | 616, Sin obligaciones fiscales (No tax obligations) |
| CFDI use (how the recipient will use the CFDI for tax purposes) | S01, Sin efectos fiscales (No tax effects) |
| Postal code | The same postal code as the issuer |
Fiscalapi applies these SAT rules before stamping, both to the recipient details you send by value and to those of a saved person (any individual or legal entity registered in your tenant), referenced by recipient.id. If any rule isn't met, the endpoint returns a 400 validation failure error that lists every failure, without using a stamp (one credit, used each time you stamp a CFDI):
| Rule | Failure field | Equivalent SAT rejection |
|---|---|---|
With the generic RFC (XAXX010101000 or XEXX010101000), the tax regime must be 616. | Recipient.TaxRegimeCode | CFDI40159 |
With the generic RFC, the recipient's postal code must be the issuer's postal code (expeditionZipCode). | Recipient.ZipCode | CFDI40149 |
The CFDI use must accept the recipient's tax regime according to c_UsoCFDI; with tax regime 616, for example, S01, CP01, and G02 are accepted. | Recipient.CfdiUseCode | CFDI40161 |
An income invoice to XAXX010101000 with the legal name PUBLICO EN GENERAL must include globalInformation. | GlobalInformation | CFDI40130 |
6. Line item details
| Field | Value |
|---|---|
itemCode | 01010101 |
quantity | 1 |
unitOfMeasurementCode | ACT |
description | Venta |
unitPrice | The sale's subtotal, before taxes. |
taxObjectCode | 02 |
itemSku | The sale's internal number. |
itemTaxes | The taxes of the sale's group. See Tax consolidation. |