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 we’ll walk you through the steps required to first register a supplier and then issue invoices in their name.Prerequisites
To issue invoices in Mexico via the SAT, you will need:- Supplier details, including:
- name,
- taxpayer ID or RFC (Registro Federal de Contribuyentes),
- address, and,
- fiscal regime code issued by SAT.
- Customer details, the same as the supplier, plus CFDI use code (código de uso CFDI).
- Line item details including quantities, prices, applicable tax rates, and the SAT product-service code.
- To have chosen an invoice series.
- Issue place code (lugar de expedición).
- A signing certificate known as a CSD (Certificado de Sello Digital) issued by the SAT for every supplier.
Setup
There are four key processes to prepare:- create supplier post-registration workflow,
- connect the SAT Mexico app,
- configure a supplier registration workflow, and,
- prepare an invoicing workflow.
These instructions apply to both the sandbox and live environments, with a few
exceptions for supplier data and registration details when real details are
not available.
1
Create Supplier post-registration workflow
2
Configure the supplier registration workflow
- Template
- Code
- Build from scratch
3
Prepare Invoice Workflow
- Template
- Code
- Build from scratch
Running
In this section we’ll provide details on how to first persist and register a supplier, followed by issuing invoices on their behalf. As usual, the recommended approach for running jobs is to perform two steps; first upload the document to the silo, second create a job.Register a Supplier
Suppliers can be registered either manually via the Invopop Console or programatically via the API. The process is essentially the same, so for this guide we’ll demonstrate the manual process.Suppliers in Mexico must authorize the PAC (Procesador Autorizado de
Certificación) used by Invopop to sign, stamp and send CFDIs to the SAT on
their behalf. Please visit https://firmamanifiesto.lunasoft.net/ and follow
the process to authorize SW Sapiens by Luna Soft S.A. de
C.V.. This is not an automated service and can only be
performed manually by a representative of the supplier.
Example: Supplier
Example: Supplier
SAT Mexico supplier example

You can access the registration link via the API by fetching the silo
entry and reading the
meta row where
the key is set to registration-link.
.cer and .key) and a password. Suppliers, companies or individuals, can follow this guide on how to obtain one.
Certificates have already been registered for all sandbox users, so you can safely run the “Post-registration workflow” manually and leave the new supplier in the sent state.
From this point on you can now send invoices on behalf of the supplier.
Send an Invoice
The following examples are of partial GOBL documents you can copy and paste directly into the Invopop Console or store via the API as silo entries. GOBL Invoices 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:$regimeto be set toMX$addonsto includemx-cfdi-v4
B2B Invoice (Personas Morales)
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-v4addon, this ensures the document will be validated using the CFDI v4 rules built into the GOBL 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.
SAT B2B Invoice
B2C Invoice (Personas Físicas)
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-regimeandmx-cfdi-useextensions have been set to616andS01respectively reflecting that the customer is not subject to tax.
SAT B2C Invoice
Simplified Invoice (Factura al público en general)
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
- the
customerfield is not required - the
$tagsfield is used to identify this as a simplified invoice.
SAT Mexico simplified invoice example
Global Invoice
Global Invoice
The Global Invoice is used to group a set of invoices into a single CFDI document.Notice:
- the
$tagsfield has been used to identify this as a global invoice, - each
linehas arefwhich is used to identify the invoice that it belongs to, - the
tax.ext.mx-cfdi-global-month,mx-cfdi-global-period, andmx-cfdi-global-yearfields have been used to identify the global invoice period.
SAT Mexico global invoice example
Credit Note
Credit Note
The Credit Note is used to cancel an invoice.Notice:
- the
$typefield has been set tocredit-note, - the
precedingfield has been used to identify the invoice that is being cancelled.
SAT Mexico credit note example
FAQ
Please contact the Invopop support team if you have any questions that are not listed here.Which PAC (Proveedor Autorizado de Certificación) does Invopop use?
Which PAC (Proveedor Autorizado de Certificación) does Invopop use?
Invopop uses SW Sapien, an Authorised Certification
Provider (PAC), to sign and stamp CFDI documents for the Mexican tax
authority.
Where can I find the mapping of GOBL fields to CFDI?
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.For further details on how GOBL prepares data for conversion, see the Mexico Tax Regime.