Fiscal Document Capture Processing Flows — NF-e, CT-e and NFS-e Inbound
| Product | NFE.io Fiscal Document Capture (dfetech-distribution-api) |
| Document | 2 of 3 — Processing flow design |
| Version | 1.1 — 2026-09-24 |
| Audience | Customers, architecture teams, IT and tax teams |
| Related documents | 1 of 3 — Architecture · 3 of 3 — Processing details and polling-frequency rules · Versão em português |
1. How to read this document
This document contains the processing flow diagrams for each sub-product. Each flow has four parts:
- Scheduling: how and when NFE.io decides to query the national environment for a company.
- Capture: the government query and how each possible response is handled.
- Per-document processing: what happens to each NSU received.
- Complementary flows: manifestation, gap recovery and on-demand capture.
The timing rules shown in the diagrams (intervals, waits and blocks) are explained and justified in document 3, with references to the government Technical Notes.
1.1 Flow common to all three products
2. NF-e Inbound
2.1 Scheduling and capture
2.2 Processing each NSU
2.3 Recipient manifestation and release of the full XML
2.4 NSU gap recovery
2.5 Point queries and consumption limit (NF-e and CT-e)
Applies to consNSU and consChNFe for NF-e and to consNSU for CT-e, both in gap recovery and in reprocessing requested by the customer.
3. CT-e Inbound
3.1 Scheduling and capture
3.2 Processing each NSU
3.3 Gap recovery and reprocessing
The CT-e distribution web service has no query by access key. All recovery is done by NSU.
4. NFS-e Inbound
4.1 Scheduling and capture
4.2 Processing each document
4.3 Taker manifestation and on-demand capture
4.4 Gap recovery
5. Query cadence life cycle (all three products)
| State | NF-e | CT-e | NFS-e |
|---|---|---|---|
| Querying | Chained queries while ultNSU is lower than maxNSU | Chained queries while ultNSU is lower than maxNSU | Up to 50 consecutive batches per run, resuming every 30 s |
| Waiting | At least 1 hour after reaching maxNSU or receiving cStat 137 (up to about 65 min) | At least 1 hour after the environment signals the end of the queue (cStat 137) | 1 hour after NENHUM_DOCUMENTO_LOCALIZADO |
| Blocked | 1 hour per company after a rejection, including 656; 656 also suspends the CNPJ's point queries | 1 hour per company after a rejection, including 656; a 656 on a point query suspends the CNPJ's point queries | Time given by the ADN in the HTTP 429, or 1 hour; 10 min after a REJEICAO with no documents captured; 1 hour for an unavailable certificate |
| Global pause | 5 min (cStat 108) and 20 min (cStat 109) | 5 min (cStat 108) and 20 min (cStat 109) | Global and per-certificate circuit breaker, 60 s |