A CFDI stamping API integration looks simple on a whiteboard: build the XML, sign it, send it to your PAC, store the UUID that comes back. In production it is a distributed system with an external dependency you do not control, a legal document at the end of it, and failure modes that cost real money: duplicate invoices, orders with no invoice, and cancellations stuck halfway. This article is about the engineering behind that call — data model, idempotency, queues, error handling, security and testing — and the trade-offs between the common approaches. If you are looking for the operational year-end checklist instead, read our guide on how to prepare your billing system for the 2027 CFDI changes .
Context: what 2027 does and does not change
According to a bulletin from the PAC SW Sapien, the 2027 tax package was published in the Diario Oficial de la Federación on November 13 , most of its changes apply from January 1, 2027, and no new CFDI version or new complements were announced.…