---
title: "Electronic Service Invoice (NFS-e)"
description: "Signer integration with NFE.io to issue and cancel NFS-e (Brazilian electronic service invoices) for paid invoices, with the first registration and setup steps."
canonical: "https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/nfse"
locale: "en"
product: "Signer"
last_updated: "2026-10-12"
---

# Electronic Service Invoice (NFS-e)

Signer can issue and cancel an NFS-e (the Brazilian electronic service invoice) for paid invoices directly, through an
integration with [NFE.io](https://nfe.io/).

> **Note**
>
> NFE.io and the municipal tax systems are Brazilian services: the linked pages and the NFE.io panel are in Portuguese.
> Panel labels below are quoted as the panel shows them, with a translation in parentheses.

## Integrating Signer with NFE.io

Most major Brazilian state capitals are already integrated, but you must ask the NFE.io sales team for the full list of
integrated municipalities, along with the prices.

### First steps

1. Register with the municipality to issue NFS-e, following the [NFE.io document](https://nfe.io/docs/documentacao/nota-fiscal-servico-eletronica/credenciamento-prefeitura/).
2. Create an account - https://nfe.io/docs/nossa-plataforma/criar-conta/
3. Create a company - https://nfe.io/docs/nossa-plataforma/criar-empresa/
4. Enter the tax information - https://nfe.io/docs/nossa-plataforma/alterar-empresa/
5. Upload the digital certificate - https://nfe.io/docs/nossa-plataforma/upload-certificado/
6. [Contact NFE.io](https://nfe.io/contato/) to negotiate prices and activate the account for production.
7. While in touch with NFE.io, ask whether the municipality that issues the invoice requires the CNAE (Brazil's National Classification of Economic Activities). If it does, use IBGE's [online CNAE search](https://concla.ibge.gov.br/busca-online-cnae.html).
8. For specific questions about NFS-e, NFE.io provides a [document](https://nfe.io/docs/documentacao/nota-fiscal-servico-eletronica/conceitos/) that summarizes how the service invoice works.

### Getting the credentials

To configure the integration you need the access key and your company ID. Open the Empresas (Companies) menu, then
click the name of the company that will issue the NFS-e.

![Select company](https://docs.lacunasoftware.com/images/signer/nfeio-companies.png)

Then scroll down to the `Chaves de Acesso` (Access keys) section. It shows the access key (Api Key) and the company ID
(CompanyId).

![Api key and Company ID](https://docs.lacunasoftware.com/images/signer/nfeio-company-and-api.png)

### Creating the webhook

The next step is to create the webhook, which notifies Signer when an NFS-e is issued or canceled. Open the Conta
(Account) option, scroll down and select the `Webhooks` section:

![Webhooks card](https://docs.lacunasoftware.com/images/signer/nfeio-webhook-option.png)

Then click the Criar Webhook (Create webhook) button:

![Create webhook](https://docs.lacunasoftware.com/images/signer/nfeio-create-webhook.png)

Select `NFS-e` as the webhook type and fill in the fields as shown below:

![Config webhook](https://docs.lacunasoftware.com/images/signer/nfeio-config-webhook.png)

Fill in the address (URL) field with the address of your Signer instance followed by the standard webhook path, as in the
example below:

```text
https://your-signer.com/api/webhooks/nfeio/nfse/changed
```

Finally, the message authentication password (HMAC) field can be any password, but we recommend at least 8 characters.

### Service code

The service code is a number that identifies the type of service provided, used on the NFS-e. The municipality where the
invoice is issued provides this code, along with the municipal tax rate.

NFE.io provides a list of the services registered for the city where the NFS-e is issued. Open the Empresas (Companies)
menu, select the company that will issue the NFS-e and click the `Lista de serviços cadastrados` (Registered services)
section.

![Companies](https://docs.lacunasoftware.com/images/signer/nfeio-companies.png)

![Service codes](https://docs.lacunasoftware.com/images/signer/nfeio-list-service-codes.png)

As mentioned above, each municipality has its own list of codes and descriptions. Taking Brasília as an example, Signer
falls under code ``0103``, but if in doubt we suggest checking with your company's accountant.

![Brasília service codes](https://docs.lacunasoftware.com/images/signer/nfeio-brasilia-service-codes.png)

## Issuing and canceling NFS-e in Signer

### Issuing invoices

Once all parameters are configured in NFE.io and Signer, you can issue an NFS-e for a paid invoice directly from the
invoice details page.

![Issue NFS-e](https://docs.lacunasoftware.com/images/signer/issue-nfse.png)

> **Note**
>
> * Only the instance administrator can issue or cancel an NFS-e.
> * The service invoice system does not depend on the iugu integration.
> * If the Signer instance is also integrated with iugu, paying the invoice automatically requests the NFS-e.

> **Warning**
>
> Issuing and canceling an NFS-e depends on the municipality's system. If that system is unstable, some invoices may take
> hours or even days to be issued or canceled.

You can also issue an NFS-e for an invoice with the request below:

```javascript
POST /api/invoices/{id}/receipts
```

When the NFS-e is issued, NFE.io itself emails the user or organization responsible for the invoice with the NFS-e PDF
and XML. You can also download or view the NFS-e on the invoice details page:

![View or Download NFS-e](https://docs.lacunasoftware.com/images/signer/view-or-download-nfse.png)

### Canceling invoices

Once an NFS-e is issued, you can cancel it on the invoice details page.

![Cancel NFS-e](https://docs.lacunasoftware.com/images/signer/cancel-nfse.png)

You can also cancel the NFS-e of an invoice with the request below:

```javascript
DELETE /api/invoices/{id}/receipts
```

> **Warning**
>
> An NFS-e can only be canceled once it is issued: if it is still being issued, wait until it is. The same applies to a new
> issue requested after a cancellation.
