> ## Documentation Index
> Fetch the complete documentation index at: https://invopop-auto-sync-workflow-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CFDI issuing guide

> Issue CFDI documents in Mexico using the SAT Mexico app.

## Introduction

The CFDI (*Comprobante Fiscal Digital por Internet*) is the standardized electronic invoicing format in Mexico, managed by the country's tax authority, the SAT (*Servicio de Administración Tributaria*). This system ensures that all fiscal documents are digitally generated, validated, and reported to SAT in compliance with national tax laws.

In this guide you'll learn how to issue documents — invoices, credit notes, and payment receipts (*comprobantes de pago*) — in a supplier's name using the [SAT Mexico app](/apps/sat-mexico). For importing received invoices, see the companion guide: [Mexico: Receiving invoices](/guides/mx-sat-receiving).

## Prerequisites

To issue invoices in Mexico via the SAT, you will need:

* **A registered supplier**: follow the [CFDI supplier registration guide](/guides/mx-sat-supplier) to connect the SAT Mexico app and register the supplier's CSD certificate with the PAC before issuing.
* **Customer Information**:
  * Name
  * Taxpayer ID (RFC - *Registro Federal de Contribuyentes*)
  * Address
  * Fiscal regime code (as defined by SAT)
  * CFDI use code (*Código de uso CFDI*)
* **Line items**:
  * Quantity, unit price, and applicable tax rates
  * SAT product/service code (*Clave Producto-Servicio*)
* **Additional requirements**
  * Selected invoice series
  * Place of issue code (*Lugar de expedición*)

## Setup

Configure your Invopop workspace for CFDI invoicing by following these steps in the [Invopop Console](https://console.invopop.com):

<Info>
  These instructions apply to both the sandbox and live environments. The SAT Mexico app must already be connected and configured — this is covered in the [supplier registration guide](/guides/mx-sat-supplier).
</Info>

Prepare a separate workflow for each document type you plan to issue: one for invoices, and one for payment receipts (*comprobantes de pago*).

<Steps>
  <Step title="Set up the SAT issue invoice workflow">
    <Tabs>
      <Tab title="Template">
        <Card iconType="duotone" title="SAT issue invoice workflow" icon="code-branch" href="https://console.invopop.com/redirect/workflows/new?template=sat-issue-invoice" cta="Add to my workspace">
          Issue a CFDI invoice through SAT.
        </Card>
      </Tab>

      <Tab title="Code">
        Copy and paste into a new [Empty Invoice workflow](https://console.invopop.com/redirect/workflows/new?template=empty-invoice) code view.

        ```json Example SAT issue invoice workflow theme={"system"}
        {
          "name": "SAT issue invoice",
          "description": "Issue an invoice through SAT and generate PDF",
          "schema": "bill/invoice",
          "steps": [
            {
              "id": "3cbf8d50-a819-11ef-87b2-fd751e6d3b88",
              "name": "Add sequential code",
              "provider": "sequence.enumerate",
              "summary": "Dynamic · SAT Invoices · 000001",
              "config": {
                "name": "SAT Invoices",
                "padding": 6,
                "start": 1
              }
            },
            {
              "id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
              "name": "Sign envelope",
              "provider": "silo.close"
            },
            {
              "id": "1f60a0b0-ea9f-11ee-8846-3d414f6173e4",
              "name": "Send document to SAT",
              "config": {
                "generate_pdf": false,
                "prepaid": false
              },
              "provider": "sat-mx"
            },
            {
              "id": "7a645420-1358-11ef-af96-a18cfb3774fa",
              "name": "Generate PDF",
              "provider": "pdf",
              "summary": "English · Letter",
              "config": {
                "layout": "Letter",
                "logo_height": 40,
                "locale": "en",
                "date_format": "%Y-%m-%d"
              }
            },
            {
              "id": "85bf20c0-1358-11ef-af96-a18cfb3774fa",
              "name": "Set state",
              "config": {
                "state": "sent"
              },
              "provider": "silo.state",
              "summary": "Set state to `sent`{.state .sent}"
            }
          ],
          "rescue": [
            {
              "id": "9a7b3d50-1358-11ef-af96-a18cfb3774fa",
              "name": "Set state",
              "config": {
                "state": "error"
              },
              "provider": "silo.state",
              "summary": "Set state to `error`{.state .error}"
            }
          ]
        }
        ```
      </Tab>

      <Tab title="Build from scratch">
        Before starting, review the [workflows guide](/guides/workflows) to understand the general setup process.

        In [Console](https://console.invopop.com), create a new workflow and choose [Empty Invoice workflow](https://console.invopop.com/redirect/workflows/new?template=empty-invoice) as the base. Then name the workflow with a descriptive label such as "Issue SAT Invoices".

        The new workflow will need to perform these steps:

        * **Add sequential code:**  with dynamic sequences, and name like "SAT Invoices".
        * **Sign envelope:** - no configuration needed
        * **Send document to SAT:** no configuration needed.
        * **Generate PDF** - Set according to your needs. Layout "Letter" and locale "es - Spanish" are recommended.
        * **Set state** - to "sent".

        Finally, in the Error Handling area, add the **Set state** action and select `Error`.

        Add any additional steps you may need, and save the new workflow.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Set up the SAT issue payment workflow">
    <Info>
      You can skip this step if you don't plan to issue payment receipts (*comprobantes de pago*) against PPD invoices.
    </Info>

    <Tabs>
      <Tab title="Template">
        <Card iconType="duotone" title="SAT issue payment workflow" icon="code-branch" href="https://console.invopop.com/redirect/workflows/new?template=mx-sat-issue-payment" cta="Add to my workspace">
          Issue a CFDI de pago (REP) through SAT.
        </Card>
      </Tab>

      <Tab title="Code">
        Copy and paste into a new [Empty Payment workflow](https://console.invopop.com/redirect/workflows/new?template=empty-payment) code view.

        ```json Example SAT issue payment workflow theme={"system"}
        {
          "name": "SAT issue payment",
          "description": "Issue a payment receipt (comprobante de pago) through SAT and generate PDF",
          "schema": "bill/payment",
          "steps": [
            {
              "id": "3cbf8d50-a819-11ef-87b2-fd751e6d3b88",
              "name": "Add sequential code",
              "provider": "sequence.enumerate",
              "summary": "Dynamic · SAT Payments · 000001",
              "config": {
                "name": "SAT Payments",
                "padding": 6,
                "start": 1
              }
            },
            {
              "id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
              "name": "Sign envelope",
              "provider": "silo.close"
            },
            {
              "id": "1f60a0b0-ea9f-11ee-8846-3d414f6173e4",
              "name": "Send document to SAT",
              "config": {
                "generate_pdf": false,
                "prepaid": false
              },
              "provider": "sat-mx"
            },
            {
              "id": "7a645420-1358-11ef-af96-a18cfb3774fa",
              "name": "Generate PDF",
              "provider": "pdf",
              "summary": "English · Letter",
              "config": {
                "layout": "Letter",
                "logo_height": 40,
                "locale": "en",
                "date_format": "%Y-%m-%d"
              }
            },
            {
              "id": "85bf20c0-1358-11ef-af96-a18cfb3774fa",
              "name": "Set state",
              "config": {
                "state": "sent"
              },
              "provider": "silo.state",
              "summary": "Set state to `sent`{.state .sent}"
            }
          ],
          "rescue": [
            {
              "id": "9a7b3d50-1358-11ef-af96-a18cfb3774fa",
              "name": "Set state",
              "config": {
                "state": "error"
              },
              "provider": "silo.state",
              "summary": "Set state to `error`{.state .error}"
            }
          ]
        }
        ```
      </Tab>

      <Tab title="Build from scratch">
        Before starting, review the [workflows guide](/guides/workflows) to understand the general setup process.

        In [Console](https://console.invopop.com), create a new workflow and choose [Empty Payment workflow](https://console.invopop.com/redirect/workflows/new?template=empty-payment) as the base. Then name the workflow with a descriptive label such as "Issue SAT Payments".

        The new workflow will need to perform these steps:

        * **Add sequential code:**  with dynamic sequences, and name like "SAT Payments".
        * **Sign envelope:** - no configuration needed
        * **Send document to SAT:** no configuration needed.
        * **Generate PDF** - Set according to your needs. Layout "Letter" and locale "es - Spanish" are recommended.
        * **Set state** - to "sent".

        Finally, in the Error Handling area, add the **Set state** action and select `Error`.

        Add any additional steps you may need, and save the new workflow.
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Send a document

<Info>
  You can complete this process through the Invopop Console or the API. We'll walk through it using the Console, but don't worry, the steps are nearly identical for the API. We'll add notes along the way to clarify any differences.
</Info>

The following examples are of partial [GOBL](https://docs.gobl.org) documents you can copy and paste directly into the [Invopop Console](https://console.invopop.com) or store via the API as silo entries.

[GOBL Invoices](https://docs.gobl.org/draft-0/bill/invoice) sent to the SAT require the following properties in order to perform the correct normalization and validation steps. Invopop will try to assign these automatically, but we recommend defining them explicitly before upload:

* `$regime` to be set to [`MX`](https://docs.gobl.org/regimes/mx)
* `$addons` to include [`mx-cfdi-v4`](https://docs.gobl.org/addons/mx-cfdi-v4)

<AccordionGroup>
  <Accordion title="B2B invoice (Personas Morales)">
    This main type of invoice is a standard B2B invoice from a Mexican supplier to another Mexican customer.

    Notice:

    * we've added the [`mx-cfdi-v4`](https://docs.gobl.org/addons/mx-cfdi-v4) addon, this ensures the document will be validated using the CFDI v4 rules built into the [GOBL](https://docs.gobl.org) library,
    * extensions (`ext`) fields have been used in multiple locations for fields whose values cannot be determined any other way,
    * VAT will be applied at the standard rate, the percentage will be set automatically, and,
    * there are no totals nor calculations, all of these will be made automatically when uploading.

    <CodeGroup>
      ```json SAT B2B Invoice theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$regime": "MX",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "series": "XXMX",
        "tax": {
          "ext": {
            "mx-cfdi-issue-place": "44100"
          }
        },
        "supplier": {
          "uuid": "018fbeda-bc61-7000-b66d-398ce3e21c43",
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "addresses": [
            {
              "street": "Julia Navarrete No. 1430",
              "locality": "Guadalajara",
              "region": "Jalisco",
              "code": "44100",
              "country": "MX"
            }
          ],
          "emails": [
            {
              "addr": "esckemperugarte@example.com"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "customer": {
          "name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
          "tax_id": {
            "country": "MX",
            "code": "URE180429TM6"
          },
          "addresses": [
            {
              "locality": "Ciudad de Mexico",
              "region": "Ciudad de Mexico",
              "code": "86991",
              "country": "MX"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "601",
            "mx-cfdi-post-code": "86991",
            "mx-cfdi-use": "G01"
          }
        },
        "lines": [
          {
            "quantity": "1",
            "item": {
              "name": "Standard Plan",
              "price": "1000.00",
              "ext": {
                "mx-cfdi-prod-serv": "81112002"
              }
            },
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          }
        ]
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"type": "standard",
      	"series": "XXMX",
      	"issue_date": "2026-07-08",
      	"issue_time": "08:51:26",
      	"currency": "MXN",
      	"tax": {
      		"ext": {
      			"mx-cfdi-doc-type": "I",
      			"mx-cfdi-issue-place": "44100",
      			"mx-cfdi-payment-method": "PPD"
      		}
      	},
      	"supplier": {
      		"uuid": "018fbeda-bc61-7000-b66d-398ce3e21c43",
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"addresses": [
      			{
      				"street": "Julia Navarrete No. 1430",
      				"locality": "Guadalajara",
      				"region": "Jalisco",
      				"code": "44100",
      				"country": "MX"
      			}
      		],
      		"emails": [
      			{
      				"addr": "esckemperugarte@example.com"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601"
      		}
      	},
      	"customer": {
      		"name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
      		"tax_id": {
      			"country": "MX",
      			"code": "URE180429TM6"
      		},
      		"addresses": [
      			{
      				"locality": "Ciudad de Mexico",
      				"region": "Ciudad de Mexico",
      				"code": "86991",
      				"country": "MX"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601",
      			"mx-cfdi-use": "G01"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "1",
      			"item": {
      				"name": "Standard Plan",
      				"price": "1000.00",
      				"ext": {
      					"mx-cfdi-prod-serv": "81112002"
      				}
      			},
      			"sum": "1000.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "1000.00"
      		}
      	],
      	"totals": {
      		"sum": "1000.00",
      		"total": "1000.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"base": "1000.00",
      							"percent": "16.0%",
      							"amount": "160.00"
      						}
      					],
      					"amount": "160.00"
      				}
      			],
      			"sum": "160.00"
      		},
      		"tax": "160.00",
      		"total_with_tax": "1160.00",
      		"payable": "1160.00"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="B2B invoice on behalf of a third party (a cuenta de terceros)">
    This invoice is used when the **issuer (supplier)** bills the customer **on behalf of another taxpayer** who is the real seller — for example **consignment** sales. The **third party** is identified on each line in the `seller` object (RFC, fiscal regime, address), while `supplier` remains the party issuing the CFDI.

    Notice:

    * the line `seller` carries the third party's tax identity and regime so SAT can relate the CFDI to **cuenta de terceros** rules,
    * the [`mx-cfdi-v4`](https://docs.gobl.org/addons/mx-cfdi-v4) addon validates extensions on supplier, customer, and line seller,
    * the minimal `tax.ext` only needs the place of issue; `gobl build` adds document type and payment method (`PPD` in the built example) like other B2B invoices,
    * there are no totals in the minimal version; upload or `gobl build` will compute IVA and totals, and,
    * the built example shows a consignment-style line (`Venta en consignación`) with full tax breakdown.

    <CodeGroup>
      ```json SAT third-party invoice theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$regime": "MX",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "series": "LMC",
        "code": "002",
        "issue_time": "01:42:18",
        "tax": {
          "ext": {
            "mx-cfdi-issue-place": "26015"
          }
        },
        "supplier": {
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "customer": {
          "name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
          "tax_id": {
            "country": "MX",
            "code": "URE180429TM6"
          },
          "addresses": [
            {
              "code": "86991"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "601",
            "mx-cfdi-use": "G01"
          }
        },
        "lines": [
          {
            "quantity": "2",
            "item": {
              "name": "Venta en consignación",
              "price": "100.00",
              "ext": {
                "mx-cfdi-prod-serv": "50211502"
              }
            },
            "taxes": [
              {
                "cat": "VAT",
                "percent": "16.0%"
              }
            ],
            "seller": {
              "name": "XENON INDUSTRIAL ARTICLES",
              "tax_id": {
                "country": "MX",
                "code": "XIA190128J61"
              },
              "addresses": [
                {
                  "code": "76343"
                }
              ],
              "ext": {
                "mx-cfdi-fiscal-regime": "601"
              }
            }
          }
        ]
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"type": "standard",
      	"series": "LMC",
      	"code": "002",
      	"issue_date": "2026-07-08",
      	"issue_time": "01:42:18",
      	"currency": "MXN",
      	"tax": {
      		"ext": {
      			"mx-cfdi-doc-type": "I",
      			"mx-cfdi-issue-place": "26015",
      			"mx-cfdi-payment-method": "PPD"
      		}
      	},
      	"supplier": {
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601"
      		}
      	},
      	"customer": {
      		"name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
      		"tax_id": {
      			"country": "MX",
      			"code": "URE180429TM6"
      		},
      		"addresses": [
      			{
      				"code": "86991"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601",
      			"mx-cfdi-use": "G01"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "2",
      			"item": {
      				"name": "Venta en consignación",
      				"price": "100.00",
      				"ext": {
      					"mx-cfdi-prod-serv": "50211502"
      				}
      			},
      			"sum": "200.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"percent": "16.0%"
      				}
      			],
      			"total": "200.00",
      			"seller": {
      				"name": "XENON INDUSTRIAL ARTICLES",
      				"tax_id": {
      					"country": "MX",
      					"code": "XIA190128J61"
      				},
      				"addresses": [
      					{
      						"code": "76343"
      					}
      				],
      				"ext": {
      					"mx-cfdi-fiscal-regime": "601"
      				}
      			}
      		}
      	],
      	"totals": {
      		"sum": "200.00",
      		"total": "200.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"base": "200.00",
      							"percent": "16.0%",
      							"amount": "32.00"
      						}
      					],
      					"amount": "32.00"
      				}
      			],
      			"sum": "32.00"
      		},
      		"tax": "32.00",
      		"total_with_tax": "232.00",
      		"payable": "232.00"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="B2C invoice (Personas Físicas)">
    This is a standard B2C invoice from a Mexican supplier to a Mexican physical person with tax details, but no specific tax declaration requirements. This would be for a larger sale when the "Simplified" and "Global invoice" do not apply.

    In addition to the observations for regular B2B invoices, note in the customer:

    * the presence of an RFC in the same format as for companies, and,
    * the [`mx-cfdi-fiscal-regime`](https://docs.gobl.org/addons/mx-cfdi-v4#fiscal-regime-code) and [`mx-cfdi-use`](https://docs.gobl.org/addons/mx-cfdi-v4#cfdi-use-code) extensions have been set to `616` and `S01` respectively reflecting that the customer is not subject to tax.

    It is important in Mexico to ensure the correct Fiscal Regime and CFDI Use codes are set correctly as the SAT will check these details and reject documents with unexpected combinations.

    <CodeGroup>
      ```json SAT B2C Invoice theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$regime": "MX",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "series": "XXMX",
        "tax": {
          "ext": {
            "mx-cfdi-issue-place": "44100"
          }
        },
        "supplier": {
          "uuid": "018fbeda-bc61-7000-b66d-398ce3e21c43",
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "addresses": [
            {
              "street": "Julia Navarrete No. 1430",
              "locality": "Guadalajara",
              "region": "Jalisco",
              "code": "44100",
              "country": "MX"
            }
          ],
          "emails": [
            {
              "addr": "esckemperugarte@example.com"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "customer": {
          "name": "LUIS IAN ÑUZCO",
          "tax_id": {
            "country": "MX",
            "code": "IAÑL750210963"
          },
          "addresses": [
            {
              "locality": "Ciudad de Mexico",
              "region": "Ciudad de Mexico",
              "code": "85256",
              "country": "MX"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "616",
            "mx-cfdi-use": "S01"
          }
        },
        "lines": [
          {
            "quantity": "1",
            "item": {
              "name": "Standard Plan",
              "price": "500.00",
              "ext": {
                "mx-cfdi-prod-serv": "81112002"
              }
            },
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          }
        ]
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"type": "standard",
      	"series": "XXMX",
      	"issue_date": "2026-07-08",
      	"issue_time": "08:51:26",
      	"currency": "MXN",
      	"tax": {
      		"ext": {
      			"mx-cfdi-doc-type": "I",
      			"mx-cfdi-issue-place": "44100",
      			"mx-cfdi-payment-method": "PPD"
      		}
      	},
      	"supplier": {
      		"uuid": "018fbeda-bc61-7000-b66d-398ce3e21c43",
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"addresses": [
      			{
      				"street": "Julia Navarrete No. 1430",
      				"locality": "Guadalajara",
      				"region": "Jalisco",
      				"code": "44100",
      				"country": "MX"
      			}
      		],
      		"emails": [
      			{
      				"addr": "esckemperugarte@example.com"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601"
      		}
      	},
      	"customer": {
      		"name": "LUIS IAN ÑUZCO",
      		"tax_id": {
      			"country": "MX",
      			"code": "IAÑL750210963"
      		},
      		"addresses": [
      			{
      				"locality": "Ciudad de Mexico",
      				"region": "Ciudad de Mexico",
      				"code": "85256",
      				"country": "MX"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "616",
      			"mx-cfdi-use": "S01"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "1",
      			"item": {
      				"name": "Standard Plan",
      				"price": "500.00",
      				"ext": {
      					"mx-cfdi-prod-serv": "81112002"
      				}
      			},
      			"sum": "500.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "500.00"
      		}
      	],
      	"totals": {
      		"sum": "500.00",
      		"total": "500.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"base": "500.00",
      							"percent": "16.0%",
      							"amount": "80.00"
      						}
      					],
      					"amount": "80.00"
      				}
      			],
      			"sum": "80.00"
      		},
      		"tax": "80.00",
      		"total_with_tax": "580.00",
      		"payable": "580.00"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Simplified invoice (Factura al público en general)">
    In Mexico, a General Public Invoice (Factura al Público en General) is a type of tax document issued to record sales made to customers who do not request an invoice with a specific Federal Taxpayer Registry (RFC) number. Instead, a generic RFC is used to identify the recipient:

    * XAXX010101000 for domestic transactions
    * XEXX010101000 for foreign transactions

    This type of invoice is mandatory for businesses that sell to the general public and do not issue individual invoices for each transaction.

    To create this type of invoice in Invopop:

    * the `customer` field is not required,
    * the `$tags` field is used to identify this as a simplified invoice.

    <CodeGroup>
      ```json SAT Mexico simplified invoice theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$regime": "MX",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "$tags": [
          "simplified"
        ],
        "series": "TEST",
        "code": "00001",
        "tax": {
          "ext": {
            "mx-cfdi-issue-place": "44100"
          }
        },
        "supplier": {
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "lines": [
          {
            "quantity": "1",
            "item": {
              "name": "Cobro por tarjetas",
              "price": "10.00",
              "ext": {
                "mx-cfdi-prod-serv": "84141602"
              }
            },
            "discounts": [
              {
                "percent": "10.0%",
                "amount": "1.00"
              }
            ],
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          },
          {
            "quantity": "1",
            "item": {
              "name": "Porcentaje sobre GMV",
              "price": "10.00",
              "unit": "service",
              "ext": {
                "mx-cfdi-prod-serv": "80141628"
              }
            },
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          }
        ],
        "payment": {
          "terms": {
            "notes": "Condiciones de pago"
          }
        }
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"$tags": [
      		"simplified"
      	],
      	"type": "standard",
      	"series": "TEST",
      	"code": "00001",
      	"issue_date": "2026-07-08",
      	"issue_time": "08:51:26",
      	"currency": "MXN",
      	"tax": {
      		"ext": {
      			"mx-cfdi-doc-type": "I",
      			"mx-cfdi-issue-place": "44100",
      			"mx-cfdi-payment-method": "PPD"
      		}
      	},
      	"supplier": {
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "1",
      			"item": {
      				"name": "Cobro por tarjetas",
      				"price": "10.00",
      				"ext": {
      					"mx-cfdi-prod-serv": "84141602"
      				}
      			},
      			"sum": "10.00",
      			"discounts": [
      				{
      					"percent": "10.0%",
      					"amount": "1.00"
      				}
      			],
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "9.00"
      		},
      		{
      			"i": 2,
      			"quantity": "1",
      			"item": {
      				"name": "Porcentaje sobre GMV",
      				"price": "10.00",
      				"unit": "service",
      				"ext": {
      					"mx-cfdi-prod-serv": "80141628"
      				}
      			},
      			"sum": "10.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "10.00"
      		}
      	],
      	"payment": {
      		"terms": {
      			"notes": "Condiciones de pago"
      		}
      	},
      	"totals": {
      		"sum": "19.00",
      		"total": "19.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"base": "19.00",
      							"percent": "16.0%",
      							"amount": "3.04"
      						}
      					],
      					"amount": "3.04"
      				}
      			],
      			"sum": "3.04"
      		},
      		"tax": "3.04",
      		"total_with_tax": "22.04",
      		"payable": "22.04"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Global invoice">
    The Global Invoice is used to group a set of invoices into a single CFDI document.

    Notice:

    * the `$tags` field has been used to identify this as a global invoice,
    * each `line` has a `ref` which is used to identify the invoice that it belongs to,
    * the [`tax.ext.mx-cfdi-global-month`](https://docs.gobl.org/addons/mx-cfdi-v4#cfdi-global-month), [`mx-cfdi-global-period`](https://docs.gobl.org/addons/mx-cfdi-v4#cfdi-global-period), and [`mx-cfdi-global-year`](https://docs.gobl.org/addons/mx-cfdi-v4#cfdi-global-year) fields have been used to identify the global invoice period.

    <CodeGroup>
      ```json SAT Mexico global invoice theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "$tags": [
          "global"
        ],
        "series": "GLOBAL",
        "code": "0001",
        "tax": {
          "ext": {
            "mx-cfdi-global-month": "03",
            "mx-cfdi-global-period": "04",
            "mx-cfdi-global-year": "2025",
            "mx-cfdi-issue-place": "44100"
          }
        },
        "supplier": {
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "lines": [
          {
            "quantity": "1",
            "item": {
              "ref": "SALE1",
              "name": "Sale 1",
              "price": "10.00"
            },
            "discounts": [
              {
                "percent": "10.0%"
              }
            ],
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          },
          {
            "quantity": "1",
            "item": {
              "ref": "SALE2",
              "name": "Sale 2",
              "price": "20.00"
            },
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          }
        ],
        "payment": {
          "advances": [
            {
              "key": "cash",
              "description": "Prepaid",
              "percent": "100%"
            }
          ]
        }
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"$tags": [
      		"global"
      	],
      	"type": "standard",
      	"series": "GLOBAL",
      	"code": "0001",
      	"issue_date": "2026-07-08",
      	"issue_time": "08:51:26",
      	"currency": "MXN",
      	"tax": {
      		"ext": {
      			"mx-cfdi-doc-type": "I",
      			"mx-cfdi-global-month": "03",
      			"mx-cfdi-global-period": "04",
      			"mx-cfdi-global-year": "2025",
      			"mx-cfdi-issue-place": "44100",
      			"mx-cfdi-payment-method": "PUE"
      		}
      	},
      	"supplier": {
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "1",
      			"item": {
      				"ref": "SALE1",
      				"name": "Sale 1",
      				"price": "10.00"
      			},
      			"sum": "10.00",
      			"discounts": [
      				{
      					"percent": "10.0%",
      					"amount": "1.00"
      				}
      			],
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "9.00"
      		},
      		{
      			"i": 2,
      			"quantity": "1",
      			"item": {
      				"ref": "SALE2",
      				"name": "Sale 2",
      				"price": "20.00"
      			},
      			"sum": "20.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "20.00"
      		}
      	],
      	"payment": {
      		"advances": [
      			{
      				"key": "cash",
      				"description": "Prepaid",
      				"percent": "100%",
      				"amount": "33.64",
      				"ext": {
      					"mx-cfdi-payment-means": "01"
      				}
      			}
      		]
      	},
      	"totals": {
      		"sum": "29.00",
      		"total": "29.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"base": "29.00",
      							"percent": "16.0%",
      							"amount": "4.64"
      						}
      					],
      					"amount": "4.64"
      				}
      			],
      			"sum": "4.64"
      		},
      		"tax": "4.64",
      		"total_with_tax": "33.64",
      		"payable": "33.64",
      		"advance": "33.64",
      		"due": "0.00"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Credit note">
    The credit note (*nota de crédito*) is used to correct, cancel, or refund a previously issued invoice.

    Notice:

    * the `type` field has been set to `credit-note`,
    * the `preceding` field has been used to identify the invoice that is being corrected.

    <CodeGroup>
      ```json SAT Mexico credit note theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "type": "credit-note",
        "series": "CN",
        "code": "0003",
        "preceding": [
          {
            "series": "TEST",
            "code": "0001",
            "issue_date": "2023-07-10",
            "stamps": [
              {
                "prv": "sat-uuid",
                "val": "1fac4464-1111-0000-1111-cd37179db12e"
              }
            ]
          }
        ],
        "supplier": {
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "addresses": [
            {
              "street": "Julia Navarrete No. 1430",
              "locality": "Guadalajara",
              "region": "Jalisco",
              "code": "44100",
              "country": "MX"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "615"
          }
        },
        "customer": {
          "name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
          "tax_id": {
            "country": "MX",
            "code": "URE180429TM6"
          },
          "addresses": [
            {
              "locality": "Ciudad de Mexico",
              "region": "Ciudad de Mexico",
              "code": "86991",
              "country": "MX"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "624",
            "mx-cfdi-use": "G01"
          }
        },
        "lines": [
          {
            "quantity": "2",
            "item": {
              "name": "Cigarros",
              "ext": {
                "mx-cfdi-prod-serv": "50211502"
              },
              "price": "100.1010",
              "unit": "piece"
            },
            "taxes": [
              {
                "cat": "VAT",
                "rate": "standard"
              }
            ]
          }
        ],
        "payment": {
          "terms": {
            "notes": "Pago a 30 días."
          }
        }
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"type": "credit-note",
      	"series": "CN",
      	"code": "0003",
      	"issue_date": "2026-07-08",
      	"issue_time": "08:53:24",
      	"currency": "MXN",
      	"preceding": [
      		{
      			"issue_date": "2023-07-10",
      			"series": "TEST",
      			"code": "0001",
      			"stamps": [
      				{
      					"prv": "sat-uuid",
      					"val": "1fac4464-1111-0000-1111-cd37179db12e"
      				}
      			]
      		}
      	],
      	"tax": {
      		"ext": {
      			"mx-cfdi-doc-type": "E",
      			"mx-cfdi-issue-place": "44100",
      			"mx-cfdi-payment-method": "PPD",
      			"mx-cfdi-rel-type": "01"
      		}
      	},
      	"supplier": {
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"addresses": [
      			{
      				"street": "Julia Navarrete No. 1430",
      				"locality": "Guadalajara",
      				"region": "Jalisco",
      				"code": "44100",
      				"country": "MX"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "615"
      		}
      	},
      	"customer": {
      		"name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
      		"tax_id": {
      			"country": "MX",
      			"code": "URE180429TM6"
      		},
      		"addresses": [
      			{
      				"locality": "Ciudad de Mexico",
      				"region": "Ciudad de Mexico",
      				"code": "86991",
      				"country": "MX"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "624",
      			"mx-cfdi-use": "G01"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "2",
      			"item": {
      				"name": "Cigarros",
      				"price": "100.1010",
      				"unit": "piece",
      				"ext": {
      					"mx-cfdi-prod-serv": "50211502"
      				}
      			},
      			"sum": "200.2020",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "16.0%"
      				}
      			],
      			"total": "200.2020"
      		}
      	],
      	"payment": {
      		"terms": {
      			"notes": "Pago a 30 días."
      		}
      	},
      	"totals": {
      		"sum": "200.20",
      		"total": "200.20",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"base": "200.20",
      							"percent": "16.0%",
      							"amount": "32.03"
      						}
      					],
      					"amount": "32.03"
      				}
      			],
      			"sum": "32.03"
      		},
      		"tax": "32.03",
      		"total_with_tax": "232.23",
      		"payable": "232.23"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Payment receipt (Comprobante de Pago)">
    This is a payment receipt (*comprobante de pago*, or REP) issued when collecting a payment against one or more invoices that were issued with the PPD (*Pago en Parcialidades o Diferido*) payment method. It is modelled as a GOBL [`bill.Payment`](https://docs.gobl.org/draft-0/bill/payment) document rather than an invoice, and must be processed through the SAT issue payment workflow.

    Notice:

    * the `$schema` is set to `bill/payment` and the `type` to `receipt`,
    * each `lines[].document` references an invoice being settled by this payment, identified by its `series`, `code`, and the SAT UUID (`sat-uuid`) stamp of the original CFDI,
    * the amounts on each line follow a strict convention:
      * **`payable`** is always the **total** amount payable on the referenced invoice across **all** installments,
      * **`advances`** is the **total** already paid in **previous** installments (omit it, or set `0`, on the first installment),
      * **`amount`** is the portion of the invoice settled by **this** payment,
      * **`installment`** is the ordinal of this payment against the invoice,
      * **`due`** is calculated **automatically** from the other fields; you don't need to set it yourself,
    * the third line (invoice `LMC` `0023`) illustrates a later installment that doesn't fully settle the invoice: `payable` `1000.00`, `advances` `500.00` already paid, `amount` `250.00` paid now, leaving a positive `due` of `250.00` for a future receipt,
    * lines carry the tax breakdown of the invoice being paid, including retained taxes,
    * the single `methods` entry describes how the payment was received; `gobl build` maps the `credit-transfer` key to the [`mx-cfdi-payment-means`](https://docs.gobl.org/addons/mx-cfdi-v4#payment-means) extension `03`,
    * other extensions that are set automatically on running `gobl build`: the document [`mx-cfdi-doc-type`](https://docs.gobl.org/addons/mx-cfdi-v4#document-type) is set to `P` and the customer's [`mx-cfdi-use`](https://docs.gobl.org/addons/mx-cfdi-v4#cfdi-use-code) to `CP01`,
    * this particular example also carries a `preceding` block, which implies that this receipt **substitutes** one previously issued — `gobl build` fills in the [`mx-cfdi-rel-type`](https://docs.gobl.org/addons/mx-cfdi-v4#relation-type) extension `04` (*Sustitución de los CFDI previos*) (omit the `preceding` block when the receipt is not a replacement), and,
    * there are no totals in the minimal version; running `gobl build` calculates the line taxes, the payment total, and all balances.

    <CodeGroup>
      ```json SAT Payment (Comprobante de Pago) theme={"system"}
      {
        "$schema": "https://gobl.org/draft-0/bill/payment",
        "$regime": "MX",
        "$addons": [
          "mx-cfdi-v4"
        ],
        "type": "receipt",
        "series": "P",
        "code": "0040",
        "currency": "MXN",
        "ext": {
          "mx-cfdi-issue-place": "44100"
        },
        "preceding": [
          {
            "issue_date": "2023-05-31",
            "series": "P",
            "code": "0039",
            "stamps": [
              {
                "prv": "sat-uuid",
                "val": "3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b"
              }
            ]
          }
        ],
        "supplier": {
          "name": "ESCUELA KEMPER URGATE",
          "tax_id": {
            "country": "MX",
            "code": "EKU9003173C9"
          },
          "addresses": [
            {
              "street": "Julia Navarrete No. 1430",
              "locality": "Guadalajara",
              "region": "Jalisco",
              "code": "44100",
              "country": "MX"
            }
          ],
          "emails": [
            {
              "addr": "esckemperugarte@example.com"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "customer": {
          "name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
          "tax_id": {
            "country": "MX",
            "code": "URE180429TM6"
          },
          "addresses": [
            {
              "locality": "Ciudad de Mexico",
              "region": "Ciudad de Mexico",
              "code": "86991",
              "country": "MX"
            }
          ],
          "ext": {
            "mx-cfdi-fiscal-regime": "601"
          }
        },
        "lines": [
          {
            "document": {
              "issue_date": "2023-05-10",
              "series": "LMC",
              "code": "0021",
              "stamps": [
                {
                  "prv": "sat-uuid",
                  "val": "0f4d2a6e-8b1c-4d3e-9f5a-7c6b5a4d3e2f"
                }
              ]
            },
            "installment": 1,
            "payable": "9533.33",
            "amount": "9533.33",
            "tax": {
              "categories": [
                {
                  "code": "VAT",
                  "rates": [
                    {
                      "base": "10000.00",
                      "percent": "16.0%"
                    }
                  ]
                },
                {
                  "code": "RVAT",
                  "retained": true,
                  "rates": [
                    {
                      "base": "10000.00",
                      "percent": "10.6667%"
                    }
                  ]
                },
                {
                  "code": "ISR",
                  "retained": true,
                  "rates": [
                    {
                      "base": "10000.00",
                      "percent": "10%"
                    }
                  ]
                }
              ]
            }
          },
          {
            "document": {
              "issue_date": "2023-05-20",
              "series": "LMC",
              "code": "0022",
              "stamps": [
                {
                  "prv": "sat-uuid",
                  "val": "5b9c8d7e-6f5a-4b3c-8d2e-1f0a9b8c7d6e"
                }
              ]
            },
            "installment": 1,
            "payable": "1660.00",
            "amount": "1660.00",
            "tax": {
              "categories": [
                {
                  "code": "VAT",
                  "rates": [
                    {
                      "base": "1000.00",
                      "percent": "16.0%"
                    },
                    {
                      "base": "500.00"
                    }
                  ]
                }
              ]
            }
          },
          {
            "document": {
              "issue_date": "2023-03-15",
              "series": "LMC",
              "code": "0023",
              "stamps": [
                {
                  "prv": "sat-uuid",
                  "val": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
                }
              ]
            },
            "installment": 3,
            "payable": "1000.00",
            "advances": "500.00",
            "amount": "250.00"
          }
        ],
        "methods": [
          {
            "date": "2023-05-30",
            "key": "credit-transfer",
            "ref": "MX0123456789",
            "amount": "11443.33"
          }
        ]
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/payment",
      	"$regime": "MX",
      	"$addons": [
      		"mx-cfdi-v4"
      	],
      	"type": "receipt",
      	"series": "P",
      	"code": "0040",
      	"issue_date": "2026-07-23",
      	"issue_time": "04:13:11",
      	"currency": "MXN",
      	"ext": {
      		"mx-cfdi-doc-type": "P",
      		"mx-cfdi-issue-place": "44100"
      	},
      	"preceding": [
      		{
      			"issue_date": "2023-05-31",
      			"series": "P",
      			"code": "0039",
      			"stamps": [
      				{
      					"prv": "sat-uuid",
      					"val": "3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b"
      				}
      			],
      			"ext": {
      				"mx-cfdi-rel-type": "04"
      			}
      		}
      	],
      	"supplier": {
      		"name": "ESCUELA KEMPER URGATE",
      		"tax_id": {
      			"country": "MX",
      			"code": "EKU9003173C9"
      		},
      		"addresses": [
      			{
      				"street": "Julia Navarrete No. 1430",
      				"locality": "Guadalajara",
      				"region": "Jalisco",
      				"code": "44100",
      				"country": "MX"
      			}
      		],
      		"emails": [
      			{
      				"addr": "esckemperugarte@example.com"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601"
      		}
      	},
      	"customer": {
      		"name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
      		"tax_id": {
      			"country": "MX",
      			"code": "URE180429TM6"
      		},
      		"addresses": [
      			{
      				"locality": "Ciudad de Mexico",
      				"region": "Ciudad de Mexico",
      				"code": "86991",
      				"country": "MX"
      			}
      		],
      		"ext": {
      			"mx-cfdi-fiscal-regime": "601",
      			"mx-cfdi-use": "CP01"
      		}
      	},
      	"lines": [
      		{
      			"i": 1,
      			"document": {
      				"issue_date": "2023-05-10",
      				"series": "LMC",
      				"code": "0021",
      				"stamps": [
      					{
      						"prv": "sat-uuid",
      						"val": "0f4d2a6e-8b1c-4d3e-9f5a-7c6b5a4d3e2f"
      					}
      				]
      			},
      			"installment": 1,
      			"payable": "9533.33",
      			"amount": "9533.33",
      			"due": "0.00",
      			"tax": {
      				"categories": [
      					{
      						"code": "VAT",
      						"rates": [
      							{
      								"base": "10000.00",
      								"percent": "16.0%",
      								"amount": "1600.00"
      							}
      						],
      						"amount": "1600.00"
      					},
      					{
      						"code": "RVAT",
      						"retained": true,
      						"rates": [
      							{
      								"base": "10000.00",
      								"percent": "10.6667%",
      								"amount": "1066.67"
      							}
      						],
      						"amount": "1066.67"
      					},
      					{
      						"code": "ISR",
      						"retained": true,
      						"rates": [
      							{
      								"base": "10000.00",
      								"percent": "10%",
      								"amount": "1000.00"
      							}
      						],
      						"amount": "1000.00"
      					}
      				],
      				"sum": "1600.00",
      				"retained": "2066.67"
      			}
      		},
      		{
      			"i": 2,
      			"document": {
      				"issue_date": "2023-05-20",
      				"series": "LMC",
      				"code": "0022",
      				"stamps": [
      					{
      						"prv": "sat-uuid",
      						"val": "5b9c8d7e-6f5a-4b3c-8d2e-1f0a9b8c7d6e"
      					}
      				]
      			},
      			"installment": 1,
      			"payable": "1660.00",
      			"amount": "1660.00",
      			"due": "0.00",
      			"tax": {
      				"categories": [
      					{
      						"code": "VAT",
      						"rates": [
      							{
      								"base": "1000.00",
      								"percent": "16.0%",
      								"amount": "160.00"
      							},
      							{
      								"base": "500.00",
      								"amount": "0.00"
      							}
      						],
      						"amount": "160.00"
      					}
      				],
      				"sum": "160.00"
      			}
      		},
      		{
      			"i": 3,
      			"document": {
      				"issue_date": "2023-03-15",
      				"series": "LMC",
      				"code": "0023",
      				"stamps": [
      					{
      						"prv": "sat-uuid",
      						"val": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
      					}
      				]
      			},
      			"installment": 3,
      			"payable": "1000.00",
      			"advances": "500.00",
      			"amount": "250.00",
      			"due": "250.00"
      		}
      	],
      	"methods": [
      		{
      			"date": "2023-05-30",
      			"key": "credit-transfer",
      			"ref": "MX0123456789",
      			"amount": "11443.33",
      			"ext": {
      				"mx-cfdi-payment-means": "03"
      			}
      		}
      	],
      	"total": "11443.33"
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Do I have to issue B2C invoices in Mexico?">
    Individual CFDIs are not required for sales under MXN \$100, but those sales must still be included in the global CFDI. Often issuing all invoices will simplify your operation.
  </Accordion>

  <Accordion title="Does Invopop support the white label (B2B2B) model in Mexico?">
    Yes. We obtain the supplier's CSD (digital seal) and credentials to issue invoices in that company's name. Read more in our [white label use case](/guides/white-label).
  </Accordion>

  <Accordion title="Can I issue a PPD invoice through Invopop?">
    Yes. The `mx-cfdi-v4` addon supports both PUE and PPD on the original invoice, and Invopop also issues the subsequent payment receipts (REPs / Pago / comprobante de pago) that must be emitted as payments are collected. Model each receipt as a GOBL [`bill.Payment`](https://docs.gobl.org/draft-0/bill/payment) referencing the PPD invoices being settled and run it through the SAT issue payment workflow. See the [payment receipt example](/guides/mx-sat-issuing) in the issuing guide.
  </Accordion>

  <Accordion title="My customer paid late and now I have to cancel and re-issue?">
    Yes, if the original was issued as PUE and payment is not received by the last day of the issuance month, rule 2.7.1.32 RMF requires cancelling the original and re-issuing as PPD with `FormaPago = 99`, then issuing REPs as payments come in. This is calendar-driven, not payment-event-driven, and it surprises most non-Mexican implementations. The conservative approach is to issue PPD whenever there is any uncertainty about same-month payment.
  </Accordion>

  <Accordion title="What happens if I miss the REP deadline?">
    REPs must be issued by the fifth calendar day of the month following payment receipt (rule 2.7.1.35 RMF). Missing the deadline does not invalidate the underlying invoice, but it prevents the customer from deducting the expense in the correct period and exposes the issuer to fines. This is a recurring source of friction and the reason customers will sometimes refuse to accept cancellations from a supplier with poor REP discipline.
  </Accordion>

  <Accordion title="How do I configure my workspace for Mexican invoicing?">
    Install the SAT Mexico app (uses SW Sapien as PAC) plus the SW Sapien app for credentials. Onboard each issuing supplier with their CSD certificate and `mx-cfdi-issue-place`. Run invoices through the Issue CFDI workflow.
  </Accordion>

  <Accordion title="Where can I find the mapping of GOBL fields to CFDI?">
    The library that transforms GOBL into CFDI documents is publicly available as an open-source project and can be found at [github.com/invopop/gobl.cfdi](https://github.com/invopop/gobl.cfdi).

    For further details on how GOBL prepares data for conversion, see the [Mexico Tax Regime](https://github.com/invopop/gobl/blob/main/regimes/mx/README.md).
  </Accordion>

  <Accordion title="The PAC keeps rejecting my invoice with a postal code error">
    The most common cause is a mismatch between the receiver's postal code in the CFDI and the postal code SAT has on file for that RFC. Resolution: ask the customer for their CIF (Constancia de Situación Fiscal) and use the postal code printed there, exactly. Secondary causes:

    * The postal code is real but not yet in `c_CodigoPostal`. Use the closest catalog code from the place of issuance.
    * The receiver is `XAXX010101000` or `XEXX010101000` and `DomicilioFiscalReceptor` differs from `LugarExpedicion`. They must be equal for generic RFCs.
    * The branch issuing the document is configured with the matriz's postal code instead of its own.
  </Accordion>

  <Accordion title="How do I issue invoices with the 8% tax rate in border zones?">
    In Mexico, a reduced VAT rate of 8% applies to transactions in border zones (northern and southern border regions). To successfully issue invoices with this rate, **both** of the following conditions must be met:

    1. The supplier's RFC must be enabled by the SAT to invoice with the reduced rate in border zones.
    2. Both the `mx-cfdi-issue-place` field and the customer's postal code (when included) must correspond to border zones.

    If either condition is not met, the SAT will reject the invoice with an error.
  </Accordion>

  <Accordion title="What does the CFDI40999 error mean and how do I resolve it?">
    CFDI40999 is a generic "unclassified error" returned by the SAT when no other, more specific error code applies. This error can have multiple causes.

    A common scenario is invoicing in border zones with the reduced 8% VAT rate. If you receive this error in that context, verify:

    1. **RFC registration**: The supplier's RFC must be registered in the taxpayers registry for the appropriate border region tax incentive. Without this registration, the SAT will reject all invoices with the reduced rate. See [SAT's registration requirements and procedures](https://www.sat.gob.mx/minisitio/EstimulosFiscalesFronteraNorteSur/) for more information.
    2. **Issue place postal code**: The [`mx-cfdi-issue-place`](https://docs.gobl.org/addons/mx-cfdi-v4#place-of-issue) field must contain a postal code from a municipality within a border zone.
    3. **Tax rate**: Ensure you're applying the correct percentage (typically 8%) for the border zone.

    If the error persists after verifying these points, or you're getting this error for other reasons, please reach out to our support team.
  </Accordion>

  <Accordion title="I'm getting the error 'Access denied, supplier XXX is not registered in this workspace'. What should I do?">
    This error appears when you try to issue an invoice for a supplier (identified by its RFC) that has not been registered in your workspace. Before you can issue on a supplier's behalf, its CSD certificate must be uploaded and validated through the registration flow.

    To fix it, make sure the supplier is correctly registered by following the [Register a supplier](/guides/mx-sat-supplier#register-a-supplier) steps in the supplier registration guide.

    In **Sandbox** you may also hit this error for suppliers that were registered in the past. This is due to a change in how supplier registration is now enforced before sending invoices. To resolve it, open the supplier's Silo Entry in the Console and run the registration process again from the start, completing every step.
  </Accordion>

  <Accordion title="Why does my customer's UsoCFDI keep getting rejected?">
    The UsoCFDI must be allowed for the receiver's `RegimenFiscal`. The catalog defines the valid combinations; not every code works for every régimen. For example, D01–D10 (personal deductions) are only valid for individuals, never for legal entities. RESICO contributors (régimen 626) have a restricted set. When in doubt, default to `S01` (Sin efectos fiscales) — it is always valid but produces a non-deductible invoice for the receiver. Always ask the customer which UsoCFDI they need before issuing.
  </Accordion>

  <Accordion title="How does Invopop handle time zones for Mexican invoices?">
    By default, Invopop uses Mexico City's time zone (UTC-6) when automatically setting the [`issue_date`](https://docs.gobl.org/draft-0/bill/invoice#issue-date) and [`issue_time`](https://docs.gobl.org/draft-0/bill/invoice#issue-time) fields. However, the SAT validates these fields based on the time zone of the postal code specified in [`mx-cfdi-issue-place`](https://docs.gobl.org/addons/mx-cfdi-v4#place-of-issue).

    If the issuing location is in a different time zone, the SAT may reject the invoice with an error indicating the timestamp is in the future, as it only allows up to 5 minutes ahead of the local time.

    To avoid this, explicitly set `issue_date` and `issue_time` in your GOBL invoice using the local time zone of the issuing location when operating outside Mexico City's time zone.
  </Accordion>

  <Accordion title="My foreign-currency invoice is failing validation">
    For non-MXN invoices, `TipoCambio` must be present and use the FIX rate published by Banxico in the DOF the day prior to the operation (Article 20 CFF, Article 56 Ley Aduanera). Common errors:

    * Using the day-of rate instead of the prior day's.
    * Quoting the inverse (USD per MXN instead of MXN per USD).
    * Setting `TipoCambio` on an MXN invoice (it must be 1 or absent).
    * Rounding inconsistently between line totals and document totals — Anexo 20 has specific rounding rules.
  </Accordion>

  <Accordion title="Where do I find Mexico-specific GOBL documentation?">
    See the [Mexico tax regime in GOBL](https://docs.gobl.org/regimes/mx) for tax categories, RFC structure, and CFDI extensions. The [`mx-cfdi-v4`](https://docs.gobl.org/addons/mx-cfdi-v4) addon documents required fields including UsoCFDI, RegimenFiscal, and place-of-issue.
  </Accordion>
</AccordionGroup>

More available in our [Mexico FAQ](/faq/mexico) section

***

<AccordionGroup>
  <Accordion title="🇲🇽 Invopop resources for Mexico">
    |            |                                                                                                                                                                                                                                                                                                 |
    | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Compliance | <Icon icon="https://assets.invopop.com/flags/mx.svg" /> [Invoicing compliance in Mexico](/compliance/mexico)<br /> <Icon icon="timeline" /> [Compliance timeline](/timelines/mexico)                                                                                                            |
    | Apps       | <Icon icon="https://assets.invopop.com/apps/sat-mexico/icon.svg" /> [SAT Mexico](/apps/sat-mexico)<br /> <Icon icon="https://assets.invopop.com/apps/sw-sapien/icon.svg" /> [SW Sapien](/apps/sw-sapien)<br /> <Icon icon="https://assets.invopop.com/apps/cron/icon.svg" /> [Cron](/apps/cron) |
    | Guides     | <Icon icon="book" /> [Supplier registration](/guides/mx-sat-supplier)<br /> <Icon icon="book" /> [Issuing documents](/guides/mx-sat-issuing)<br /> <Icon icon="book" /> [Receiving invoices](/guides/mx-sat-receiving)                                                                          |
    | FAQ        | <Icon icon="square-question" /> [Mexico FAQ](/faq/mexico)                                                                                                                                                                                                                                       |
    | GOBL       | <Icon icon="https://assets.invopop.com/icons/gobl.svg" />  [Mexico Tax Regime](https://docs.gobl.org/regimes/mx)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [Mexican SAT CFDI Addon](https://docs.gobl.org/addons/mx-cfdi-v4)                                              |
    | GitHub     | <Icon icon="github" /> [gobl.cfdi](https://github.com/invopop/gobl.cfdi)                                                                                                                                                                                                                        |
  </Accordion>
</AccordionGroup>

<Card title="Participate in our community" icon="forumbee" href="https://community.invopop.com" arrow="true" horizontal>
  Ask and answer questions about invoicing in Mexico →
</Card>
