[BR] Services Invoice (NFSe)
What is an NFSe?
An NFSe (Nota Fiscal de Serviço Eletrônica) is the electronic invoice for services in Brazil. It is authorized by the municipality (Prefeitura) where the supplier is established, or through the NFSe Nacional. Brinta sends it to the right authority automatically.
| Field | Value |
|---|---|
invoice_type | debit |
document_type | services invoice |
e_invoice | true |
currency | BRL |
When to issue an NFSe
| Situation | Issue? |
|---|---|
| Sale of services to a Brazilian business (CNPJ) | ✅ Yes |
| Sale of services to an individual (CPF) | ✅ Yes |
| Sale of services to a foreign buyer | ✅ Yes, it is issued as an export of services |
| Rental, lease or assignment of real estate | ✅ Yes, but follow Services Invoice for Rental |
| Sale of goods | ❌ No, use Goods Invoice (NFe) |
Field by Field
Root Level
supplier_company_id
supplier_company_idUUID of the issuing company in Brinta. The prestador (CNPJ, Inscrição Municipal, tax regime and address) is pulled from this record. The supplier's municipality must be supported.
invoice_date
invoice_dateIssuance date in YYYY-MM-DD. Also used as the data de competência.
additional_info
additional_infoFree text appended to the service description (discriminação) on the NFSe. The full description is limited to 2000 characters.
buyer
buyerThe buyer is the tomador of the NFSe.
company.type
company.type| Value | When to use | Tax registration read |
|---|---|---|
business | Legal entity | CNPJ |
person | Individual (pessoa física) | CPF |
company.legal_name
company.legal_nameRazão social (business) or full name (person), as registered with Receita Federal.
tax_registrations[]
tax_registrations[]type | Required | Description |
|---|---|---|
CNPJ | For business | 14 digits. Dots, slash and dash are removed automatically. |
CPF | For person | 11 digits. |
IM | Optional | Inscrição Municipal of the tomador. |
If no tax registration is sent, the NFSe is issued without a tomador.
company.address
company.address| Field | Description |
|---|---|
address_line_1 | Street with the number at the end ("Alameda Santos 2200"). Trailing digits are sent as the number. With no trailing digits, SN is sent. |
address_line_2 | Complemento. |
neighborhood | Bairro. |
city | Municipality name ("São Paulo"). |
state | ISO format (BR-SP). |
postal_code | CEP. |
country | Country. |
Most municipalities reject a tomador with an incomplete address, so send every field. Each one is limited to 40 characters.
Foreign buyers
Send the buyer's foreign tax ID in tax_registrations[].number and a non-BR address.country. The NFSe is issued with the foreign tomador fields and ISS exigibility set to export.
items[]
items[]How items are combined
An NFSe carries one service. If you send several items:
amountof every item is summed into the service value.discountof every item is summed into the deductions.- The description lists each item as
name+description+ amount. - Taxes,
cstand most classification codes are read from the first item only (items[0]):cityServiceCode,nbs code,cClassTrib,operation indicator brandresponsavel retencao. - The municipal fields are taken from the first item that carries them:
Natureza operacao,tipo de tributação,codigo pais prestacao,pis cofins retidoandtipo operacao.
If items need different codes, issue one NFSe per item. The safest practice is to put every category on items[0].
categories[]
categories[]list | Required | Description |
|---|---|---|
cityServiceCode | Yes | Municipal service code, as defined by the supplier's Prefeitura (i.e. in São Paulo, the São Paulo service code). |
nbs code | Yes | NBS code, 9 digits without dots (1.1801.22.00 → "118012200"). Code list |
cClassTrib | Recommended | IBS/CBS tax classification. Default 000001. Code list |
operation indicator br | Recommended | IBS/CBS operation type (supply location). Default 100301. Code list |
tipo de tributação | São Paulo only | One-letter São Paulo taxation type. See São Paulo. |
responsavel retencao | Optional | Only used when ISS is withheld. 1 = withheld by the buyer (default), 2 = withheld by an intermediary. |
Natureza operacao | Optional, some Prefeituras | Nature-of-operation code, 1 to 6, see the table below. Any other value is rejected. |
tipo operacao | Optional, some Prefeituras | Numeric operation type, when the Prefeitura requires one. Sent as is. |
Natureza operacao values
Natureza operacao values| Code | Description |
|---|---|
1 | Taxed in the municipality |
2 | Taxed outside the municipality |
3 | Exempt |
4 | Immune |
5 | Exigibility suspended by court decision |
6 | Exigibility suspended by administrative proceeding |
cst
cst| Field | Description |
|---|---|
ibs_cbs | 3-digit CST for IBS/CBS. Default 000 (Tributação integral). |
pis_cofins | Optional CST for PIS/COFINS. Invalid codes are not sent. |
Defaults for IBS/CBSWhen the IBS/CBS fields are not sent, Brinta applies CST
000, cClassTrib000001and operation indicator100301. Only rely on these defaults when they really describe your operation.
taxes[]
taxes[]taxes[].name
taxes[].name| Value | Description |
|---|---|
ISS | Imposto Sobre Serviços. Without withholding_type, ISS is due by the supplier. With withholding_type: "withholding", it is ISS retido. |
PIS | Programa de Integração Social |
COFINS | Contribuição para o Financiamento da Seguridade Social |
CSLL | Contribuição Social sobre o Lucro Líquido |
IRRF (or IR) | Imposto de Renda Retido na Fonte |
INSS | Contribuição previdenciária |
CP | Contribuição previdenciária (CP) |
taxes[].rate
taxes[].rateDecimal, never a percentage: 0.02 = 2%.
taxes[].withholding_type
taxes[].withholding_typeUse withholding on every tax the tomador withholds. Omit it for taxes paid by the supplier.
taxes[].adds_to_final_amount
taxes[].adds_to_final_amountfalse for all NFSe taxes.
Municipality-specific rules
Each Prefeitura runs its own NFSe system, so a few fields change with the supplier's municipality (never the buyer's). The payload shape is the same everywhere; only the categories below change.
São Paulo
São Paulo authorizes the NFSe in real time: the response already carries the NFSe number and verification code.
| Category | What to send |
|---|---|
cityServiceCode | The São Paulo service code (5 digits). |
tipo de tributação | Optional. When omitted, São Paulo applies T. Required with P for exports. |
tipo de tributação values:
| Code | Description |
|---|---|
T | Taxed in São Paulo (default) |
F | Taxed outside São Paulo |
A | Taxed in São Paulo, exempt |
B | Taxed outside São Paulo, exempt |
D | Taxed in São Paulo with partial exemption |
M | Taxed in São Paulo, subjective immunity |
N | Taxed outside São Paulo, subjective immunity |
R | Taxed in São Paulo, objective immunity |
S | Taxed outside São Paulo, objective immunity |
X | Taxed in São Paulo, exigibility suspended |
V | Taxed outside São Paulo, exigibility suspended |
P | Export of services |
Export from São Paulo, categories on items[0]:
"categories": [
{ "code": "02800", "list": "cityServiceCode" },
// São Paulo service code (example only)
{ "code": "118012200", "list": "nbs code" },
{ "code": "P", "list": "tipo de tributação" }
]Barueri
Barueri processes the NFSe in batches: the invoice stays in process until the Prefeitura returns the batch, and the PDF can be published a while after approval. The XML Barueri returns does not contain the full NFSe data; use the PDF and the verification code as the reference.
| Category | What to send |
|---|---|
cityServiceCode | The 9-digit activity code registered for the supplier at the Prefeitura de Barueri. It is not the CNAE: check it in the supplier's municipal registration. |
"categories": [
{ "code": "010701220", "list": "cityServiceCode" },
// 9-digit activity code from the Prefeitura de Barueri (example only)
{ "code": "118012200", "list": "nbs code" },
{ "code": "000001", "list": "cClassTrib" },
{ "code": "100301", "list": "operation indicator br" }
]Full Example Payload
{
"supplier_company_id": "{{company_id}}",
"invoice_type": "debit",
"document_type": "services invoice",
"invoice_date": "2026-10-01",
"invoice_due_date": "2026-10-31",
"currency": "BRL",
"e_invoice": true,
"invoice_external_id": "NFSE-100001",
"additional_info": "Contrato 2026/015",
"buyer": {
"company": {
"name": "CLIENT TECNOLOGIA LTDA.",
"legal_name": "CLIENT TECNOLOGIA LTDA.",
"type": "business",
"email": "[email protected]",
"tax_registrations": [
{ "number": "71175537000130", "type": "CNPJ", "level": "country", "location": "BR" },
{ "number": "12345678", "type": "IM", "level": "municipality", "location": "BR-SP" }
// IM is optional
],
"address": {
"country": "BR",
"address_line_1": "Alameda Santos 2200",
// Street number at the end
"address_line_2": "Conjunto 51",
"neighborhood": "Cerqueira César",
"city": "São Paulo",
"state": "BR-SP",
"postal_code": "01418200"
}
}
},
"items": [
{
"item_external_id": "SRV-001",
"name": "Digital Services",
"description": "Licença de software - outubro/2026",
"amount": 2500,
"categories": [
{ "code": "6491", "list": "cityServiceCode" },
// Municipal service code from the Prefeitura
{ "code": "118012200", "list": "nbs code" },
// NBS, 9 digits without dots
{ "code": "000001", "list": "cClassTrib" },
{ "code": "100301", "list": "operation indicator br" }
],
"cst": {
"ibs_cbs": "000"
},
"taxes": [
{ "name": "ISS", "rate": 0.02, "rate_type": "percentage", "amount": 50, "adds_to_final_amount": false },
// ISS due by the supplier: no withholding_type
{ "name": "IRRF", "rate": 0.015, "rate_type": "percentage", "amount": 37.5, "adds_to_final_amount": false, "withholding_type": "withholding" },
{ "name": "PIS", "rate": 0.0065, "rate_type": "percentage", "amount": 16.25, "adds_to_final_amount": false, "withholding_type": "withholding" },
{ "name": "COFINS", "rate": 0.03, "rate_type": "percentage", "amount": 75, "adds_to_final_amount": false, "withholding_type": "withholding" },
{ "name": "CSLL", "rate": 0.01, "rate_type": "percentage", "amount": 25, "adds_to_final_amount": false, "withholding_type": "withholding" }
// Taxes withheld by the tomador
]
}
]
}Common Mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Codes sent on the second or later item | cityServiceCode, nbs code, cClassTrib, operation indicator br, responsavel retencao, cst and taxes are ignored there, and the defaults or the first item's values are used | Put all classification codes on items[0], or issue one NFSe per service |
Natureza operacao outside 1 to 6 | Rejected by Brinta before issuing | Send a code from the table above, or omit it |
NBS sent with dots (1.1801.22.00) | The authority rejects the code | Send the 9 digits without dots: "118012200" |
Street number in address_line_2 or in the middle of address_line_1 | The number is sent as SN | End address_line_1 with the number |
Rate sent as a percentage (2) | Tax is calculated as 200% | Send decimals: 0.02 |
Withheld tax without withholding_type | Tax is treated as due by the supplier | Add "withholding_type": "withholding" |
| Supplier municipality not supported | The NFSe cannot be issued | Check the Prefeituras list |
| Real-estate rental issued as a regular NFSe | Rejected for missing property data | Follow Services Invoice for Rental |
Updated 11 days ago
