← Back to blog
Invoicing

CFDI Stamping & PAC: What Actually Happens When You Invoice

November 17, 20263 min readIng. Humberto González

You hit 'Invoice' and seconds later you have a UUID. But what's the PAC actually checking? Here's the real flow—and what your system needs to get right.

The moment between Invoice and UUID

When you generate an invoice in Mexico, you're not just creating a PDF. You're sending structured data to a third-party validator called a PAC—Proveedor Autorizado de Certificación (Authorized Certification Provider)—who stamps it with the government's digital seal. That stamp is the UUID, and without it, your invoice doesn't exist legally.

The whole dance takes seconds, but a lot has to go right. Let me walk you through what actually happens.

What the PAC does (and doesn't do)

The PAC is not the government. It's a private company authorized by the SAT to validate and digitally sign your CFDI (Comprobante Fiscal Digital por Internet—the official invoice format). Think of it as a notary who checks your paperwork before handing it back stamped.

When your system sends an invoice to the PAC, they verify:

  • Issuer data: Your RFC, business name, and tax regime match what the SAT has registered.
  • Receiver data: The customer's RFC (if it's a business) or their tax ID is valid format. If they gave you a blank RFC or a fake one, the PAC catches it.
  • Tax regime alignment: If you're registered as 'Persona Física' but trying to invoice as 'Sociedad Mercantil,' it fails.
  • Location and ZIP: Your registered address and the customer's address are formatted correctly.
  • CFDI use code: The use code you assigned (G01 for general, P01 for payment, etc.) makes sense for the transaction type.
  • Math: Subtotal + tax = total. No rounding errors, no negative amounts, no missing line items.
  • Catalog codes: Product codes, tax types, and payment methods are from the SAT's official lists.

If any of these fail, the PAC rejects the invoice and returns an error. Your system gets the message and has to ask you to fix it.

What your system must send correctly

This is where most invoicing breaks down. Your software has to build the CFDI XML file perfectly—every field, every decimal, every code in the right place. Here's what trips people up:

Issuer data: If your RFC doesn't match your SAT registration exactly, stamping fails. No typos, no extra spaces.

Receiver tax regime: If you invoice a customer with RFC 'XXX000000000' but don't tell the PAC their tax regime (e.g., 'Persona Física'), validation fails. A lot of small systems skip this and wonder why invoices bounce.

ZIP codes: They must be real and match the address. The PAC has a database of valid ZIP codes; if yours is off by one digit, it fails.

CFDI use code: You have to pick the right one. A retail sale is G01. A payment toward a credit is P01. If you use the wrong code, the PAC will reject it or, worse, accept it and the customer's accountant will flag it later.

How to choose your stamping setup

You have three paths:

  • Built into your invoicing software: The easiest. The software connects to a PAC on your behalf. You pay per invoice (usually $0.50 to $1.50 MXN). Good for small volume. The risk: if the software has a bug in how it builds the XML, every invoice fails the same way.
  • Direct PAC integration: You pick a PAC (Quadrum, Finkok, Vauxoo, Solucion Facil, etc.) and connect your system directly. Costs are similar or cheaper per invoice at scale. You have more control but need technical setup.
  • Hybrid (my recommendation): Use software that validates your data BEFORE sending to the PAC. That means catching bad RFC formats, missing tax regimes, and ZIP code mismatches before they waste a stamping attempt.

The cheapest PACs run $0.30–$0.50 per invoice. The most expensive add features like email delivery or retry logic and charge $1.50+. Volume matters; if you stamp 1,000 invoices a month, the difference between $0.50 and $1.00 is $500.

What to look for

When you're picking how to stamp, ask: Does the system validate customer tax data before stamping? Does it catch ZIP code errors? Does it show you exactly why an invoice failed? Does it retry automatically? And what happens when the PAC is slow—does your invoice queue backup?

The best setups catch problems early. That's why I built Hailan with validation that runs before the PAC ever sees the invoice—your customer's tax data, their address, their CFDI use code all get checked against SAT rules first. It saves you stamping fees, frustration, and the awkward conversation with a customer whose invoice failed because their RFC was wrong.

Invoices that come out right the first time

The CFDI 4.0 invoice comes straight from the sale, with customer tax data validated before stamping and the payment receipt when needed.

See invoicing →

You might also like