Introduction
Brazil has a variety of electronic tax documents that must be issued in different cases for various tax purposes. These include service invoices (NFS-e), product invoices (NF-e), and consumer invoices (NFC-e). Each document type is subject to variations from state to state and municipality to municipality, with each jurisdiction applying its own rules, formats, and APIs for issuing fiscal documents. Invopop’s Documentos Fiscais Eletrônicos app provides a unified way to issue fiscal documents across all Brazilian states and over 2000 municipalities using GOBL. You can find the full list of supported municipalities here. This guide will walk you through the steps required first to register a supplier and then issue electronic fiscal documents in their name.Prerequisites
To issue electronic fiscal documents in Brazil, you will need:- Supplier details, including:
- name,
- CNPJ (Cadastro Nacional da Pessoa Jurídica),
- address,
- municipality code (IBGE),
- municipal registration number (for NFS-e),
- state registration number (for NF-e and NFC-e),
- whether the supplier opts into the Simples Nacional tax regime,
- whether the supplier benefits from a fiscal incentive, and,
- optionally, any special tax regime (MEI, estimated, coop…) the supplier is subject to.
 
- Customer details (except for NFC-e where the customer is optional).
- Details of the goods or services provided:
- quantity,
- price,
- applicable tax rates (ISS, ICMS, PIS, COFINS, etc.), and,
- (only for services) service code (Código Item Lista Serviço) as defined by the municipality.
 
- To have chosen an invoice series
- A certificate and password accepted by the municipality (for NFS-e) or the state (for NF-e and NFC-e) to send electronic fiscal documents in the name of the supplier.
Setup
There are four key processes to prepare:- connect the Documentos Fiscais Eletrônicos Brazil app,
- create the supplier registration workflow,
- configure the supplier post-registration workflow,
- prepare the invoicing workflows.
These instructions apply to both the sandbox and live environments. Please note that the sandbox environment is simulated, and most responses are mocked. You’ll still need to register suppliers in the sandbox, but the company details, certificates or passwords don’t need to be valid or real.
1
Connect the Documentos Fiscais Eletrônicos Brazil app
Enter the Configuration section, then tap Apps. Tap on the Connect button of the Documentos Fiscais Eletrônicos Brazil app.

2
Create the supplier registration workflow
Follow one of the methods below and ensure to Save and Publish the workflow:
- Template
- Code
- Build from scratch
3
Configure the supplier post-registration workflow
Follow one of the methods below and ensure to Save and Publish the workflow:Now you need to go back to Configuration > Apps, tap the Configure button on the Documentos Fiscais Eletrônicos Brazil app, choose the “Post-registration workflow” we just created and Save the changes.
- Template
- Code
- Build from scratch
This workflow will automatically be executed once a supplier completes the registration process. You can customize it to suit your needs (e.g., adding a webhook, or an email notification after a supplier has been registered.)
4
Prepare NFS-e Workflow
You can skip this step if you’re not interested in issuing NFS-e documents.
- Template
- Code
- Build from scratch
5
Prepare NFC-e Workflow
You can skip this step if you’re not interested in issuing NFC-e documents.
- Template
- Code
- Build from scratch
Running
In this section, we’ll provide details on how to first persist and register a supplier, followed by issuing invoices on their behalf. As usual, the recommended approach for running jobs is to perform two steps; first upload the document to the silo, second create a job. All operations described in the following sections can be performed manually via the Invopop Console, or programmatically via the API. The process is essentially the same in both cases, so we’ll demonstrate the manual method for this guide.Register a Supplier
Find the Parties section of the sidebar and click Suppliers. Tap the + New Supplier button to be presented with a new editor. Copy and paste the example provided below (for testing purposes only, in production you’ll need the details of an actual company). The example includes all the fields required to register a supplier for both NF-e/NFC-e and NFS-e issuance.Brazil supplier example for sandbox
Processing state. Tap the Meta tab to see the registration link:

You can access the registration link via the API by fetching the silo
entry and reading the 
meta row where
the key is set to registration-link.
Registered.
From this point on, you can send service invoices on behalf of the supplier.
Send Invoices
The following examples are of example GOBL documents you can copy and paste directly into the Invopop Console or store via the API as silo entries. Then, you must run the “Issue NFS-e” or the “Issue NFC-e” workflow created during setup over them.In the sandbox environment, you’ll notice that executing the workflow will always result in the same PDF and XML being attached to the silo entry. These are mock-up files returned by the sandbox environment for testing purposes.In production, the actual XML file sent to the tax authority and the actual PDF generated will be attached to the silo entry.
B2B Service Invoice (NFS-e)
In this example, we’re issuing a simple service invoice (NFS-e) from a Brazilian supplier to another Brazilian business customer. Please note:- We’ve added the br-nfse-v1addon; this ensures the document will be validated using the NFS-e rules built into the GOBL library.
- Extensions (ext) and identities have been used in multiple locations for fields whose values cannot be determined any other way.
- ISS percentage is provided explicitly as it varies depending on the municipality and type of service.
- There are no totals or calculations; all these will be made automatically when uploading.
- Make sure to process it with the “Issue NFS-e” workflow created during setup.
B2B Service Invoice (NFS-e)
B2C Consumer Invoice (NFC-e)
In this example, we’re issuing a simple consumer invoice (NFC-e) from a Brazilian supplier. Please note:- We’ve added the br-nfe-v1addon; this ensures the document will be validated using the NF-e/NFC-e rules built into the GOBL library.
- The customer is optional and in this example we’ve omitted it.
- Extensions (ext) and identities have been used in multiple locations for fields whose values cannot be determined any other way.
- Tax percentages are provided explicitly as they vary depending on the state and type of goods.
- There are no totals or calculations; all these will be made automatically when uploading.
- Make sure to process it with the “Issue NFC-e” workflow created during setup.
B2C Consumer Invoice (NFC-e)
FAQ
Please contact the [Invopop support team] (email:support@invopop.com) if you have any questions that are not listed here.Do you support other types of “documentos fiscais eletrônicos”?
Do you support other types of “documentos fiscais eletrônicos”?
At the moment, only NFC-e and NFS-e are supported. We are working on adding support for other types.
Where can I find the mapping of GOBL fields to DF-e documents?
Where can I find the mapping of GOBL fields to DF-e documents?
For further details on how GOBL prepares data for conversion, see: