Ecommerce 04 Oct 2026 7 min de lectura 80 views

CFDI Invoicing for Your Online Store: How to Automate It

How to handle CFDI in ecommerce: customer tax data, self-invoicing, credit notes and payment reconciliation so you do not lose hours every month-end.

The order arrived, the payment cleared and, two days later, the customer writes: "I need my invoice, but I got my RFC wrong." If it happens ten times a month, it is annoying; if it happens a hundred, it is a full-time job. Ecommerce invoicing done right saves time, avoids mistakes and reduces friction with your customers.

Short answer: To automate CFDI invoicing in an online store, connect your platform to an authorized certification provider (PAC) through its API, validate the RFC (Mexican taxpayer ID) and postal code when they are entered, and stamp the invoice when payment is confirmed. Define deadlines, cancellations and returns with your accountant, because the rules depend on your tax regime.

This article is for guidance only and does not replace your accountant: tax rules change and depend on your regime. Consult them before defining the process.

Why is invoicing in ecommerce a special challenge?

The Comprobante Fiscal Digital por Internet (CFDI), Mexico's electronic invoice, is issued through an authorized certification provider (PAC) and validated by the Servicio de Administración Tributaria (SAT), Mexico's tax authority.

In a physical shop you hand over the invoice on the spot. Online, the sale happens without you being present, and several factors get mixed together:

  • Customers who want an invoice and others who do not.
  • Poorly entered tax data: legal name, RFC, postal code, regime and CFDI use.
  • Payments by different means that clear on different dates.
  • Returns, cancellations and credit notes.
  • Sales to the general public that must also be recorded.

What data do you need from the customer to invoice?

To issue an invoice correctly, the following are normally required, depending on the current CFDI version and your case:

  • Name or legal name exactly as it appears on their tax status certificate (constancia de situación fiscal).
  • RFC.
  • Postal code of the tax address.
  • Tax regime.
  • CFDI use.
  • Email to send it to.

Asking the customer for their tax status certificate, or validating the data as it is entered, reduces rejections. Confirm the exact and current requirements with your accountant or your stamping provider.

Which invoicing model suits your store?

1. Manual invoicing

The customer requests it by email or WhatsApp and someone issues it in a portal. It is acceptable with few orders, but it consumes time, is error-prone and becomes unworkable as you grow.

2. Self-invoicing through a portal

Your customer enters a page, types the order number and their tax data, and the system issues the invoice. It reduces operational load and gives the customer autonomy. It requires connecting your store to an authorized certification provider (PAC).

3. Automatic invoicing at payment

At checkout the customer indicates whether they need an invoice and enters their data; when payment is confirmed, it is stamped and emailed with no intervention. It is the most convenient, but it needs good data validation and clear rules.

Model Operational effort Ideal for
Manual High Few orders per month
Self-invoicing Low Medium volume, mixed customers
Automatic at checkout Very low High volume, B2B sales

How the technical integration works

In broad strokes:

  1. Your store records the order and the payment.
  2. The tax information is sent to an authorized certification provider through its API.
  3. The provider stamps the document and returns the XML and the PDF.
  4. Your system stores them, links them to the order and sends them to the customer.
  5. If there is a cancellation or return, the corresponding documents are issued, such as a credit note.

For the full picture of collections and stamping, see how to automate invoicing and collections with CFDI in a small business. Many platforms have plugins for this; in other cases a custom integration that connects your store, your ERP or your accounting system makes more sense.

How do you reconcile payments and invoices?

A frequent pain: the bank deposits in batches, minus fees, and it is hard to know which order matches which deposit. If you also download receipts, look at the SAT integration for automatic download and reconciliation. To keep it orderly:

  • Store the gateway's payment identifier on each order.
  • Record fees separately so your accountant can treat them correctly.
  • Review weekly the paid orders without an invoice and invoices without an order.
  • Define a cutoff period for requesting an invoice and publish it in your policies.

Internal rules worth defining

  • Maximum deadline for the customer to request their invoice.
  • What to do if the order is invoiced with incorrect data.
  • Who authorizes cancellations and when.
  • How partial returns are handled.
  • How sales with no invoice request are invoiced to the general public.
  • Where XML and PDF files are stored and for how long.

Validate each point with your accountant, because they depend on your regime and the current regulations.

Common mistakes

  • Entering the RFC without validating its format or the postal code.
  • Allowing invoicing of canceled orders or orders without confirmed payment.
  • Not saving the order-invoice relationship, which complicates cancellations.
  • Invoicing manually "because there are only a few" until there are no longer a few.
  • Changing stamping provider without backing up earlier documents.
  • Forgetting the privacy notice when asking for tax data.

Example of an orderly flow

An auto parts store, for example, can request tax data at checkout only from those who mark that they need an invoice, validate the RFC and postal code on the spot, stamp when payment is confirmed and send the XML and PDF by email. Orders with no invoice request are grouped into the general public invoice as your accountant indicates. That way nobody writes later to ask for what should already have arrived on its own.

When is it worth automating invoicing?

If you use payment gateways, compare the payment APIs in Mexico (Stripe, Mercado Pago, Conekta and Openpay). If you spend several hours a week issuing invoices or fixing mistakes, automation probably pays for itself in saved time. If you invoice only a few times a month, a well-documented manual process may be enough for now.

At DaltoAura we connect online stores with stamping providers, ERPs and accounting systems, and we design the flow together with your accountant to avoid surprises.

Frequently asked questions

What is a PAC and how do I choose one?

An authorized certification provider (PAC) is a company authorized by the Servicio de Administración Tributaria (SAT) to stamp your invoices. When choosing one, check that it has a documented API, support, a clear cost per stamp, backup of your XML files and compatibility with your platform. Confirm the details with your accountant.

What do I do if the customer requested their invoice with the wrong RFC?

The recommended approach is to validate the RFC and postal code when they are entered to avoid it. If it has already been issued, consult your accountant about the current cancellation and reissuing procedure, because it depends on your case and the applicable regulations. Document the correction and keep the relationship between order and invoice.

Until when can the customer request their invoice?

Define a deadline in your policies and publish it in the store. Tax regulations and your regime influence the reasonable cutoff period, so validate it with your accountant. A clear deadline reduces late requests, last-minute corrections and disorder in your monthly closings.

How is the return of an already invoiced order handled?

It depends on the case: cancellation, credit note or another treatment according to timing, amount and your regime. Define the flow with your accountant and record which order and which document are related. Automating that relationship avoids errors when there are partial returns or product exchanges.

Let's talk

If your team spends too much time invoicing online orders, tell us how you do it today and we will review what can be automated and with what scope.

Tags:

#CFDI #invoicing #ecommerce #SAT

Share this article

← Previous

How to Evaluate AI Agents Before and After Product...

Next →

Absences, Late Arrivals and Incidents: How to Reco...

Related Articles