Sign inGet started
Back to blog
Solutions

SEFAZ unavailable: how to confirm it and issue NF-e in contingency

What to do when SEFAZ is unavailable: where to check the official status, what codes 108 and 109 mean, and how the SVC, EPEC and FS-DA contingency modes work.

When SEFAZ is unavailable, the first step is to confirm where the failure is. The NF-e Portal keeps a Consultar Disponibilidade (service availability) page that shows, for each authorizer (AM, BA, GO, MG, MS, MT, PE, PR, RS, SP, SVAN, SVRS and the SVC-AN and SVC-RS contingency environments), the state of each web service: authorization, authorization return, number invalidation, protocol lookup, service status, taxpayer lookup and event reception. Green means a positive response; yellow, the first negative response (no service or connection failure), which lasts up to 10 minutes; red, consecutive negative responses.

Once the outage is confirmed, there are two official paths. If the issuance is not urgent, the contingency manual lets you simply wait for service to return and resume issuing in normal mode. If it is urgent, Ajuste SINIEF 07/05 allows operating in contingency when, due to technical problems, the NF-e cannot be transmitted or no response to the authorization request can be obtained, using one of three alternatives: SVC, EPEC or FS-DA. There is no hierarchy among them. One rule applies to all of them: an NF-e that was already transmitted and got no response cannot have its number reused — the contingency invoice gets a new number.

How to tell the service is down

To the issuing system, the outage shows up in the status web service (NfeStatusServico). MOC 7.0 defines three responses: 107 – Serviço em Operação (service running), 108 – Serviço Paralisado Momentaneamente (curto prazo) (service briefly stopped, short term) and 109 – Serviço Paralisado sem Previsão (service stopped with no forecast). At each state's discretion, the xObs field carries details such as scheduled maintenance or an expected return time. Whatever message shows up on screen, this code is what tells you whether the service is down. The same manual asks applications that poll the status in a loop to wait at least 3 minutes between queries.

Contingency through SVC

The SVC (SEFAZ Virtual de Contingência) receives and authorizes NF-e in place of the home SEFAZ, but only after the home SEFAZ itself activates it. Before using it, the application checks the SVC status and only sends invoices once it gets 107; codes 113 and 114 mean the SVC is being deactivated and is disabled. The XML is generated again with tpEmis 6 (SVC-AN) or 7 (SVC-RS), with the contingency reason (xJust) and start date and time (dhCont). The DANFE is printed on plain paper and an invoice authorized by the SVC does not need to be retransmitted to the home SEFAZ. According to the availability page, SVC-AN serves AC, AL, AP, CE, DF, ES, MG, PA, PB, PI, RJ, RN, RO, RR, RS, SC, SE, SP and TO; SVC-RS serves AM, BA, GO, MA, MS, MT, PE and PR.

The SVC does not do everything the normal environment does. It only cancels invoices it authorized itself; correction letters and other events are not offered, and neither is number invalidation. Cancellations of invoices authorized in the normal environment and invalidations are held until the home SEFAZ is back. When the outage ends, the home SEFAZ deactivates the SVC, and deactivation is preceded by 15 minutes during which both environments accept invoices at the same time.

EPEC and FS-DA

EPEC (Evento Prévio de Emissão em Contingência), the prior contingency issuance event, may be used by any issuer unable to transmit or to receive the authorization. The NF-e is generated with tpEmis 4, with the reason and the date and time contingency began, and a summary of it — issuer, access key, recipient's state and CNPJ or CPF, total amount, ICMS and ICMS-ST — is signed with the digital certificate and sent to the National Environment's event registration service. Once the EPEC is received, the DANFE is printed on plain paper, in at least two copies, carrying the statement “DANFE impresso em contingência - EPEC regularmente recebido pela Secretaria da Receita Federal do Brasil”. Note: under § 19 of clause eleven of Ajuste SINIEF 07/05, effective October 1, 2026, EPEC no longer applies to Paraíba and Paraná.

FS-DA is the contingency using the security form for printing auxiliary documents of electronic fiscal documents — the simplest mode and the one least dependent on infrastructure. The NF-e gets tpEmis 5, with the reason and the contingency start date and time, and the DANFE is printed in at least two copies on the security form, carrying the statement “DANFE em Contingência - impresso em decorrência de problemas técnicos”. In this mode, printing the DANFE on plain paper breaks the rules and makes the document invalid for the movement of goods. Note for São Paulo: since 1 January 2026 the SEFAZ-SP has discontinued the contingency with the DANFE printed on FS-DA (Portaria SRE 35/2025); in that state, SVC and EPEC remain.

After the contingency

Returning to normal has rules too. Invoices issued under EPEC or FS-DA must be transmitted to SEFAZ immediately after the problem ends, and within 168 hours of issuance at most. If one of them is rejected, the file is generated again with the same number and series, fixing the error without changing values that determine the tax, registration data that change the sender or recipient, or the issue or departure date. Invoices left pending a response must also be handled: those that ended up authorized, but whose transaction was covered by a contingency invoice, are cancelled; those that were not authorized have their numbers invalidated. If, after the deadline, the recipient cannot confirm the authorization, they must notify their tax office.

In stackin, the issuance request (POST /api/v1/invoices) accepts the contingency field, which sends the NF-e through the contingency authorizer; it applies to NF-e only.