Issuing invoices in Mexico means generating a CFDI 4.0 and stamping it with the SAT through a PAC (Authorized Certification Provider). Doing it by hand, invoice by invoice, is slow and error-prone; doing it via API, embedded in your processes, turns invoicing into an invisible step that just happens. This guide explains what you need, how the stamping flow works, and how to automate it with Floogos, where issuing a CFDI is a node inside your workflow, not a separate project.
Note: this article is a general technical guide, not tax advice. Always validate the current requirements with the SAT or your accountant.
- Authority
- SAT
- UUID
- A1B2-C3D4-E5F6
- Tax
- IVA 16%
- Delivery
- XML + PDF
Key concepts in 30 seconds
Gather what you need
Before issuing via API, have your company's data and certificates ready:
- Issuer RFC and tax data (Tax Regime, address postal code)
- Your Digital Seal Certificate (CSD): .cer certificate and .key with its password
- An account with a PAC (Facturama, Finkok, SW sapien, etc.) and its API credentials
- Your item catalog with SAT product/service and unit keys
💡 Tip: start in the PAC's sandbox. You stamp test CFDIs with no fiscal validity until everything is tuned.
Build the CFDI 4.0
With the transaction data, the receipt is built with everything version 4.0 requires:
- Issuer, receiver (with Tax Regime and CFDI Use) and postal code
- Items with product/service key, unit key, quantity and amount
- Taxes (16% VAT or others as applicable) and totals
- Payment method and form
💡 Tip: version 4.0 is strict about the receiver: name and regime must match their Tax Situation Certificate exactly, or stamping is rejected.
Stamp with the PAC
Here's where the fiscal magic happens: the PAC seals the CFDI on the SAT's behalf.
- You send the CFDI (signed with your CSD) to the PAC's API
- The PAC validates, stamps and returns the XML with the Digital Fiscal Stamp (UUID/folio)
- Many PACs also return the printable representation (PDF)
- If something fails, the PAC returns the rejection reason to fix it
💡 Tip: always keep the stamped XML; it's the valid fiscal document. The PDF is just its visual representation.
Deliver and archive
With the stamped CFDI, you close the cycle by delivering and storing it:
- Send the XML and PDF to the customer (by email or their usual channel)
- Archive the stamped XML for your accounting and audits
- Record the UUID in your ERP, store or database
- Update the order/invoice status in your system
💡 Tip: automate the delivery to the customer too. A CFDI that's stamped but doesn't arrive on time creates friction all the same.
Cancel when needed
CFDI 4.0 cancellation has its own procedure and it's best to plan for it:
- Request the cancellation stating the reason (and the replacing CFDI, if applicable)
- In certain cases the receiver must accept the cancellation
- The PAC handles the request with the SAT
- Record the receipt's new status in your systems
💡 Tip: define from the start who cancels and how. Improvised cancellations are a classic source of accounting mismatches.
How you automate it with Floogos
In Floogos, all of the above fits into a workflow. The Mexico invoicing node handles the CFDI and stamping; you just connect the trigger and the data:
- 1A trigger starts the process (a sale in your store, a form, an order in your ERP)
- 2The workflow takes the transaction data and builds the CFDI 4.0
- 3The Mexico node stamps with your PAC and receives the XML with UUID
- 4Another node sends the XML/PDF to the customer and archives the receipt
- 5The UUID is recorded and the status updated, with traces and insights per run
💡 The PAC credential is configured once and reused. And since it's a workflow, you can issue in batches, retry rejections and notify errors automatically.
Frequently asked questions
Can I stamp CFDIs directly without a PAC?
No. In Mexico, stamping with the SAT must be done through an authorized PAC. Floogos connects to your PAC to do it automatically from your workflows.
What do I need to start invoicing via API?
Your tax data (RFC, regime, postal code), your Digital Seal Certificate (CSD), a PAC account and its API credentials. With that, the Mexico node can already stamp.
Can I test before issuing real invoices?
Yes. PACs offer a sandbox where you stamp CFDIs with no fiscal validity to validate your integration before going to production.
Is it good for issuing many invoices at once?
Yes. As a workflow, you can issue in batches, automatically retry rejected receipts and get alerts on errors, something unfeasible by hand.
E-invoicing in Mexico doesn't have to be a manual, stressful month-end task. With CFDI 4.0 issued via API and embedded in your processes, every sale invoices itself, reaches the customer and gets archived, with full traceability. Floogos turns stamping into just another node in your workflow; you focus on the business, not the paperwork.
Official sources
General technical guide, not tax advice. Requirements verified against official sources; always check the current regulations with the SAT or your accountant.
