Processing Flows: NF-e, NFC-e, Taxes and Taxes Payment Forms
| Product | NFE.io Product Invoice Issuance (dfetech-product-invoice-api) |
| Document | 2 of 4: Processing flow design |
| Version | 1.0 (2026-09-24) |
| Audience | Customers, architecture teams, IT and tax departments |
| Related documents | 1 of 4: Architecture · 3 of 4: Processing, resilience, idempotency and contingency · 4 of 4: Messaging and queues (Portuguese) · Versão em português |
1. How to read this document
This document contains the flow diagrams for each subproduct. Document 3 explains in writing the timing rules, the retry limits, the idempotency guarantees and the contingency settings.
In the diagrams, the English names (for example, Issued or issued_error) are the values the customer sees in the invoice status field and in the webhook action.
1.1 Common view: the life of an invoice
1.2 Invoice states (status)
2. NF-e (model 55)
2.1 Request intake (API)
2.2 Invoice creation and tax calculation
2.3 Numbering, signing and authorization
2.4 SEFAZ response handling and query by access key
2.5 Distribution XML, notification and DANFE
2.6 Cancellation
2.7 Electronic Correction Letter (Carta de Correção Eletrônica, CC-e)
2.8 Number disablement (inutilização)
2.9 EPEC contingency
3. NFC-e (model 65)
3.1 Asynchronous issuance
3.2 Synchronous issuance
3.3 Offline contingency (tpEmis=9)
3.4 Later transmission of contingency invoices
3.5 Cancellation and number disablement
The flows follow the same steps as the NF-e (sections 2.6 and 2.8), with the consumer_invoice event type. Cancellation requires an authorized invoice (Issued): an invoice in IssuedContingency that has not yet been transmitted can only be cancelled after it is authorized. The NFC-e has no correction letter (Carta de Correção).
4. Taxes: tax calculation
4.1 Per-item calculation
IBS and CBS are calculated in a separate call, made by the NF-e and the NFC-e for the items that request the official calculation (section 6).
4.2 Product registration
5. Taxes Payment Forms: DIFAL payment slips
6. Relationship between NF-e, NFC-e and Taxes
- The NF-e and the NFC-e call Taxes only when the customer requests automatic calculation on the items. Without that request, they use the values in the payload as received.
- Credit invoices and debit invoices of types 01, 02, 03, 05 and 08 skip the calculation.
- Taxes does not communicate with SEFAZ. The issuance flow does not call Payment Forms: Payment Forms reads the already authorized NF-e when the customer requests the payment slip.