Every month, many accounting teams repeat the same routine: log into the SAT portal, download the received and issued CFDI, open XML files, cross-check them against the books and look for what is missing. It is necessary but mechanical work, and it is exactly where automation contributes the most. With a well-built integration, invoices arrive on their own, get validated and get reconciled.
Short answer: Integration with the Servicio de Administración Tributaria (SAT), Mexico's tax authority, lets you automatically download issued and received CFDI (Mexico's electronic invoices) through its bulk download service, validate their status and reconcile them with your accounting. It requires the company's e.firma (Mexico's electronic signature), which must be safeguarded with strict security and access controls.
What can be automated with the SAT?
The bulk CFDI download is a service of the Servicio de Administración Tributaria (SAT) that lets a taxpayer request and obtain in batches the digital tax receipts it has issued and received, authenticating with its e.firma.
- Download of issued and received CFDI. The SAT offers a bulk download service that is accessed with the company's e.firma.
- Reading the XML files. Extract issuer, recipient, amounts, taxes, UUID, payment method and form, line items and complements.
- Status validation. Check whether a receipt is valid or cancelled.
- Reconciliation. Cross-check CFDI against payments, purchases, expenses and accounting records.
- Detection of gaps. Invoices at the SAT with no internal record, and internal records with no invoice.
- Alerts. Notice of cancelled or duplicate receipts, or those from unrecognized suppliers.
How does the bulk CFDI download work?
In general terms, the process has four steps:
- Authentication with the company's valid e.firma.
- Request for a period, indicating whether they are issued or received, with optional filters.
- Verification: the SAT processes the request and notifies when the packages are ready.
- Download of the packages with the XML files.
The technical details, request limits and response times are set by the SAT and may be updated, so it is best to follow its official documentation when implementing. Don't assume the service responds immediately: the process is asynchronous and requires retries.
How do you protect the e.firma and the security of the integration?
The e.firma is equivalent to your handwritten signature before the SAT. Whoever has it can carry out procedures on behalf of the company. Therefore:
- Never share the e.firma file by email or chat.
- Store the certificate, key and password in an encrypted secrets vault, with restricted access.
- Limit which system and which people can use it.
- Record each use in a log.
- Renew the certificate before it expires and give advance notice.
- If you work with a third party, formalize responsibilities in a contract and consider whether you prefer a certified provider that already handles this safeguarding.
This is a risk decision, not just a technical one. If you don't feel secure about safeguarding it, there are specialized third-party services that reduce your exposure.
How is the status of a CFDI validated?
The SAT offers a status query for a receipt using data such as UUID, issuer RFC (taxpayer ID), recipient RFC and total. Automating it lets you:
- Verify suppliers before recording an expense or paying an invoice.
- Detect cancellations after receipt.
- Flag receipts not found for review.
Do it when you receive the CFDI and repeat it periodically at month-end close, because a receipt that is valid today may be cancelled later.
How are CFDI reconciled with the accounting?
Once you have the structured XML data, you can cross-check it in several ways:
| Cross-check | What it detects |
|---|---|
| Received CFDI vs. recorded purchases | Expenses without an invoice or invoices not recorded |
| Issued CFDI vs. sales | Sales not invoiced or over-invoiced |
| Payment CFDI vs. banks | Payments without a complement or collections not applied |
| CFDI vs. journal entries | Differences in amounts or taxes |
The system should propose matches by UUID, RFC, date and amount, and send ambiguous cases to human review. The accountant still decides; they just stop spending hours searching.
Example of a complete flow
- Every night, the system requests the new CFDI for the period.
- It downloads and unzips the packages.
- It reads the XML files and stores the data in structured tables, with the original XML archived.
- It validates the status of the received receipts.
- It cross-checks against purchases and payments already recorded.
- It generates a list of pending items: invoices with no record, records with no invoice, cancelled ones.
- It sends a summary to the accounting team and publishes the detail on a dashboard.
On the issuing and collection side, see how to automate invoicing and collections.
Frequent mistakes
- Downloading only once a month and finding everything at once on closing day. Better daily or weekly.
- Not archiving the original XML. The PDF does not replace the tax receipt.
- Ignoring the complements (payments, payroll, bill of lading), which carry key information.
- Confusing issue date with payment date when reconciling.
- Only one person with access to the e.firma, with no backup or procedure.
- Making tax changes on your own. Automation supports the process; tax decisions are validated by your accountant.
To bring the receipts into a consolidated database, see ETL and data pipelines and the guide to data quality.
Personal data and confidentiality
CFDI contain information about customers, suppliers and, in payroll, employees. Limit access by role, encrypt storage and define how long you will keep the files in line with your obligations and your privacy notice.
What scope and cost does this integration have?
An integration that downloads, reads, validates and reconciles CFDI with your accounting can take from a few weeks of development to a couple of months, depending on your accounting system and the complexity of the reconciliation. Costs depend on the scope; as a reference, they start at tens of thousands of MXN. It can also be combined with invoicing and collections automation.
When it isn't worth it
If you receive a handful of invoices a month, the manual effort may be reasonable. The integration pays for itself when there are hundreds of receipts, several legal entities or closings that are delayed by reconciliation. At DaltoAura we develop this type of integration with care for credential safeguarding and traceability of every step.
Frequently asked questions
Do I need the e.firma to download CFDI automatically?
Yes. The SAT's bulk download service authenticates the company with its valid e.firma. Because it is an instrument equivalent to a handwritten signature, it must be safeguarded encrypted, with limited access and usage logs. It is wise to define with your accountant and the provider who administers it and how access is revoked.
What is the difference between downloading and validating a CFDI?
Downloading is obtaining the receipt's XML file; validating is checking its status with the SAT to know whether it is valid or cancelled. A downloaded CFDI may have been cancelled afterward, so we recommend revalidating periodically, especially before accounting closes or tax filings.
How often should I sync CFDI with my system?
It depends on the use. For accounting reconciliation, a daily or weekly sync is enough; if you need closer control of suppliers or expenses, it can be done several times a day. Also consider that the SAT limits requests and that receipts can take time to appear in its portal.
What common errors appear when reconciling CFDI with the accounting?
The most frequent are cancelled receipts that remain recorded, partial payments without a complement, differences due to exchange rate, duplicates from loading the same XML and suppliers with a mistyped RFC. An automated process detects these differences and flags them for review, instead of relying on a manual search.
Let's talk
If your accounting team spends days downloading XML files and cross-checking them by hand, tell us how they do it. At DaltoAura we design the integration with security controls and connect it to your system.