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. For importing received invoices, see the companion guide: Mexico: Receiving invoices.Prerequisites
To issue invoices in Mexico via the SAT, you will need:- A registered supplier: follow the CFDI supplier registration guide 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:Set up the SAT issue invoice workflow
- Template
- Code
- Build from scratch
SAT issue invoice workflow
Set up the SAT issue payment workflow
- Template
- Code
- Build from scratch
SAT issue payment workflow
Send a document
$regimeto be set toMX$addonsto includemx-cfdi-v4
B2B invoice (Personas Morales)
B2B invoice (Personas Morales)
- 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.
B2B invoice on behalf of a third party (a cuenta de terceros)
B2B invoice on behalf of a third party (a cuenta de terceros)
seller object (RFC, fiscal regime, address), while supplier remains the party issuing the CFDI.Notice:- the line
sellercarries the third party’s tax identity and regime so SAT can relate the CFDI to cuenta de terceros rules, - the
mx-cfdi-v4addon validates extensions on supplier, customer, and line seller, - the minimal
tax.extonly needs the place of issue;gobl buildadds document type and payment method (PPDin the built example) like other B2B invoices, - there are no totals in the minimal version; upload or
gobl buildwill compute IVA and totals, and, - the built example shows a consignment-style line (
Venta en consignación) with full tax breakdown.
B2C invoice (Personas Físicas)
B2C invoice (Personas Físicas)
- 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.
Simplified invoice (Factura al público en general)
Simplified invoice (Factura al público en general)
- XAXX010101000 for domestic transactions
- XEXX010101000 for foreign transactions
- the
customerfield is not required, - the
$tagsfield is used to identify this as a simplified invoice.
Global invoice
Global invoice
- 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.
Credit note
Credit note
- the
typefield has been set tocredit-note, - the
precedingfield has been used to identify the invoice that is being corrected.
Payment receipt (Comprobante de Pago)
Payment receipt (Comprobante de Pago)
bill.Payment document rather than an invoice, and must be processed through the SAT issue payment workflow.Notice:- the
$schemais set tobill/paymentand thetypetoreceipt, - each
lines[].documentreferences an invoice being settled by this payment, identified by itsseries,code, and the SAT UUID (sat-uuid) stamp of the original CFDI, - the amounts on each line follow a strict convention:
payableis always the total amount payable on the referenced invoice across all installments,advancesis the total already paid in previous installments (omit it, or set0, on the first installment),amountis the portion of the invoice settled by this payment,installmentis the ordinal of this payment against the invoice,dueis calculated automatically from the other fields; you don’t need to set it yourself,
- the third line (invoice
LMC0023) illustrates a later installment that doesn’t fully settle the invoice:payable1000.00,advances500.00already paid,amount250.00paid now, leaving a positivedueof250.00for a future receipt, - lines carry the tax breakdown of the invoice being paid, including retained taxes,
- the single
methodsentry describes how the payment was received;gobl buildmaps thecredit-transferkey to themx-cfdi-payment-meansextension03, - other extensions that are set automatically on running
gobl build: the documentmx-cfdi-doc-typeis set toPand the customer’smx-cfdi-usetoCP01, - this particular example also carries a
precedingblock, which implies that this receipt substitutes one previously issued —gobl buildfills in themx-cfdi-rel-typeextension04(Sustitución de los CFDI previos) (omit theprecedingblock when the receipt is not a replacement), and, - there are no totals in the minimal version; running
gobl buildcalculates the line taxes, the payment total, and all balances.
FAQ
Do I have to issue B2C invoices in Mexico?
Do I have to issue B2C invoices in Mexico?
Does Invopop support the white label (B2B2B) model in Mexico?
Does Invopop support the white label (B2B2B) model in Mexico?
Can I issue a PPD invoice through Invopop?
Can I issue a PPD invoice through Invopop?
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 referencing the PPD invoices being settled and run it through the SAT issue payment workflow. See the payment receipt example in the issuing guide.My customer paid late and now I have to cancel and re-issue?
My customer paid late and now I have to cancel and re-issue?
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.What happens if I miss the REP deadline?
What happens if I miss the REP deadline?
How do I configure my workspace for Mexican invoicing?
How do I configure my workspace for Mexican invoicing?
mx-cfdi-issue-place. Run invoices through the Issue CFDI workflow.Where can I find the mapping of GOBL fields to CFDI?
Where can I find the mapping of GOBL fields to CFDI?
The PAC keeps rejecting my invoice with a postal code error
The PAC keeps rejecting my invoice with a postal code error
- The postal code is real but not yet in
c_CodigoPostal. Use the closest catalog code from the place of issuance. - The receiver is
XAXX010101000orXEXX010101000andDomicilioFiscalReceptordiffers fromLugarExpedicion. They must be equal for generic RFCs. - The branch issuing the document is configured with the matriz’s postal code instead of its own.
How do I issue invoices with the 8% tax rate in border zones?
How do I issue invoices with the 8% tax rate in border zones?
- The supplier’s RFC must be enabled by the SAT to invoice with the reduced rate in border zones.
- Both the
mx-cfdi-issue-placefield and the customer’s postal code (when included) must correspond to border zones.
What does the CFDI40999 error mean and how do I resolve it?
What does the CFDI40999 error mean and how do I resolve it?
- 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 for more information.
- Issue place postal code: The
mx-cfdi-issue-placefield must contain a postal code from a municipality within a border zone. - Tax rate: Ensure you’re applying the correct percentage (typically 8%) for the border zone.
I'm getting the error 'Access denied, supplier XXX is not registered in this workspace'. What should I do?
I'm getting the error 'Access denied, supplier XXX is not registered in this workspace'. What should I do?
Why does my customer's UsoCFDI keep getting rejected?
Why does my customer's UsoCFDI keep getting rejected?
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.How does Invopop handle time zones for Mexican invoices?
How does Invopop handle time zones for Mexican invoices?
issue_date and issue_time fields. However, the SAT validates these fields based on the time zone of the postal code specified in mx-cfdi-issue-place.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.My foreign-currency invoice is failing validation
My foreign-currency invoice is failing validation
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
TipoCambioon an MXN invoice (it must be 1 or absent). - Rounding inconsistently between line totals and document totals — Anexo 20 has specific rounding rules.
Where do I find Mexico-specific GOBL documentation?
Where do I find Mexico-specific GOBL documentation?
mx-cfdi-v4 addon documents required fields including UsoCFDI, RegimenFiscal, and place-of-issue.🇲🇽 Invopop resources for Mexico
🇲🇽 Invopop resources for Mexico