Electronic Tax Invoice System: What You Need to Issue NF-e, NFC-e, NFS-e, CT-e, and MDF-e
By Ana da Forcoder6 min read

In this article
- Which tax documents our systems issue
- What your system needs before issuing the first invoice
- Direct with the government or via a third-party provider
- The most expensive errors and how we prevent them
- Received invoices and files for the accountant
- Tax Reform: IBS and CBS
- How Forcoder can help with your fiscal project
- Frequently asked questions
Issuing an invoice through your system may seem like just another feature—until the day it gets rejected and a truck is stuck at the dock or a customer is kept waiting at checkout. Electronic tax documents have numbers that can’t be reused, deadlines for cancellations, rules that constantly change with technical notes, and master data that must be correct before the first invoice is ever sent.
Forcoder builds systems that issue electronic tax documents in production. In this article, we explain what a fiscal invoicing system must have, which documents we already issue, and how we help avoid the most costly errors.
Which tax documents our systems issue
Each document serves a different business process and connects to a different government agency. Here’s a map of what’s already implemented in the code of our products.
| Document | Purpose | Where Implemented |
|---|---|---|
| NF-e (model 55) | Sale and goods circulation | LogFrota and ValuERP, direct to SEFAZ |
| NFC-e (model 65) | Retail sale at checkout | ValuERP, with POS and 80mm receipt |
| CT-e | Transportation service provision | LogFrota, in production |
| MDF-e | Manifest for cargo accompanying the vehicle | LogFrota, in production |
| DC-e | Content declaration in transportation | LogFrota, in production |
| NFS-e | Service provision | National Standard in LogFrota and ValuERP; city agencies and issuers in LogFrota |
In addition to these documents, LogFrota handles events like CT-e Correction Letter, closing and canceling MDF-e, CIOT with ANTT, and cargo insurance confirmation. In ValuERP, the NF-e and NFC-e are generated from the POS and online store, with DANFE and DANFCE created by the system itself.
What your system needs before issuing the first invoice
Most rejections don’t come from connecting with SEFAZ, but from incomplete master data. The issuer, product, and customer details all need to be set up correctly before the XML is assembled.
- Valid A1 digital certificate (e-CNPJ) for the issuer’s CNPJ
- Active State Tax ID and SEFAZ authorization to issue NF-e or NFC-e in that state
- CSC (Taxpayer Security Code) generated on the SEFAZ portal, for NFC-e
- Correct tax regime: CSOSN for Simples Nacional, CST for standard regime
- Products registered with NCM, CFOP, origin, and unit
- Business customers with address and IBGE city code
- Municipal Registration, service code, and ISS rate for NFS-e
- Set series and numbering, including contingency series
In ValuERP, this checklist became a screen: the system lists the tax pending items for each store before allowing the cashier to issue, separating what actually blocks issuance, what SEFAZ will reject, and what just needs attention, with a button taking you straight to the correction page.
Direct with the government or via a third-party provider
There are two ways for a system to issue invoices, and we’ve worked with both.
Direct with SEFAZ and the National Environment
The system builds the XML, signs with the client’s A1 certificate, and transmits. There’s no per-invoice fee, but maintenance is up to the developer: technical notes, layout changes, contingencies, and the Tax Reform. This is how LogFrota issues CT-e, MDF-e, and NF-e in production, and it’s the approach used in ValuERP for NF-e, NFC-e, and NFS-e using the national standard. For technical details, see our article on practical SEFAZ integration.
Via a third-party provider (aggregator)
For municipal NFS-e, each city can have its own standard. In this case, it makes sense to use a provider that already connects to hundreds of municipalities. LogFrota integrates with Focus NFe, Nuvem Fiscal, Spedy, NFE.io, and PlugNotas, as well as direct connections to standards like GissOnline, IssNet, eGoverneISS, Nota Salvador, and SimplISS. FunnelMax issues its own service invoices through Spedy.
The most expensive errors and how we prevent them
Lost numbering
Tax numbering can't be reused. If the system reserves a number and issuance fails, the range must be canceled or reused with proper controls. Our systems validate everything before reserving a number so that internal rejections don’t waste invoice numbers.
Accidentally issuing in production
In LogFrota, every new database starts in homologation (test). Only the company administrator can switch to production, and must confirm the change. The public demo is locked in simulated mode. In homologation, SEFAZ replaces recipient names with the phrase "sem valor fiscal" (“no tax validity”), and the system displays this as a watermark on the PDF.
Rejections nobody understands
SEFAZ responds with a code and a technical phrase. Our systems translate common rejections into clear explanations in Portuguese and direct users to the correction screen. This removes support from the equation and avoids blind resubmissions.
Expired certificate on issuance day
The A1 is valid for one year and most forget the date. ValuERP automatically notifies expiration by email 30, 15, and 7 days before, and on the day it expires, while highlighting the certificate in the dashboard as it nears the end.
Received invoices and files for the accountant
A complete fiscal system also retrieves documents. Through SEFAZ’s distribution, our systems fetch NF-e issued to the company’s CNPJ, and in LogFrota, the invoice for the cargo can automatically appear linked to the CT-e, with alerts if the NF-e is canceled after transport. For NFS-e, the National Environment also allows retrieval of received invoices.
At the end of the month, the accountant needs the XML files. ValuERP exports a zipped file for a selected period containing issued, canceled, voided, and received invoices, with optional PDFs and a spreadsheet summary.
Tax Reform: IBS and CBS
The Tax Reform brings new IBS and CBS tax groups to fiscal documents. LogFrota already runs the Receita’s official calculator in a dedicated environment for IBS/CBS assessment on CT-e, in both regular and Simples Nacional regimes, and product/service registration needs to load the new tax classifications. Leaving this to the last minute will reveal all the data gaps in the form of rejection errors.
How Forcoder can help with your fiscal project
- Mapping. Which documents your operation issues, in which states and cities, and under which regime.
- Deciding the approach. Direct with SEFAZ, with the National Environment, via provider, or a combination.
- Homologation (testing). Test runs using the company’s certificate, without tax validity.
- Assisted production. Switchover to production mode with close monitoring of initial invoices.
- Maintenance. Technical notes, layout changes, and Tax Reform updates.
If your company needs a custom system that issues tax documents, or needs to integrate issuance into an existing system, contact Forcoder or message us on WhatsApp.
Frequently asked questions
Do I need a digital certificate to issue NF-e through the system?
Yes. NF-e, NFC-e, CT-e, and MDF-e are all signed with the company's certificate. Our systems use the A1 (.pfx file with password), valid for one year.
Can you issue NFS-e for any municipality?
For municipalities using the national standard, we issue directly via the National Environment. For cities with their own systems, we use direct connections to the most common standards or a third-party provider already serving the municipality.
Can I test without issuing a real invoice?
Yes. All issuance starts in homologation (the SEFAZ test environment) where documents have no tax validity.
Can Forcoder integrate invoice issuance into a system I already have?
Yes. Issuance can be a module of your existing system or a separate service that your system calls via API.
In this article
- Which tax documents our systems issue
- What your system needs before issuing the first invoice
- Direct with the government or via a third-party provider
- The most expensive errors and how we prevent them
- Received invoices and files for the accountant
- Tax Reform: IBS and CBS
- How Forcoder can help with your fiscal project
- Frequently asked questions








