webmania®
  • Contact

Region and language

Brazil

  • PTPortuguês (Brasil)
  • ENEnglish
  • ESEspañol
Sign in Book a demo
Solutions
Fiscal IssuerFiscal MonitorTax ReconciliationArtificial Intelligence

Document guide

NF‑e (electronic invoice)NFS‑e (service invoice)CT‑e and CT‑e OS (freight bills)NFC‑e (consumer receipt)DC‑e (content declaration)MDF‑e (cargo manifest)NFCom (telecom invoice)CIOT (road freight code)Tax payment slips

Tax intelligence and security

ByPass®Webmania® TaxesTax reformSecurityWebmania® Trust Center
Brazil tax guide

Start here

Brazil tax guideComplete guide

Popular chapters

NF‑e · Electronic invoiceNFS‑e · Service invoiceCT‑e · Freight billTax reformGlossary
Industries
Technology & SaaSRetail & CommerceLogistics & TransportationEnterprise

By company size

Mid-sized Companies

Other industries

ManufacturingBanks & FintechsServices & Subscriptions
Developers
See all documentation →

Tax & Invoicing

Goods invoice (NF‑e)Service invoice (NFS‑e)Telecom invoice (NFCom)Fiscal Monitor

Logistics & Transport

Freight bill (CT‑e)Cargo manifest (MDF‑e)Content declaration (DC‑e)CIOT / PEF (ANTT)

Payments & Management

GNREDARE‑ICMS SPDUA‑ESB2B Management

Resources

Docs for LLMs (llms.txt)Webmania® Status (in Portuguese)SEFAZ Monitor (in Portuguese)City Hall Monitor (in Portuguese)
Company

Webmania

About WebmaniaCustomers
ContactPortuguês (Brasil)
Sign in →Book a demo
Fiscal IssuerIssue NF‑e, NFS‑e, CT‑e and other documents from the panel or the API→Fiscal MonitorReceive the invoices issued to your CNPJs, straight from SEFAZ and city halls→Tax ReconciliationCheck the new CBS tax against the Federal Revenue before you pay→Artificial IntelligenceUnderstand rejections, set up taxes and update records with AI→

Document guide

NF‑eElectronic invoiceNFS‑eService invoiceCT‑e and CT‑e OSFreight billNFC‑eConsumer receiptDC‑eElectronic content declarationMDF‑eCargo manifestNFComTelecom invoice

Document guide

CIOTRoad freight registration codeTax payment slipsGNRE, DARE‑ICMS SP and DUA‑ES from the NF‑e

Tax intelligence and security

ByPass®ERP values without recalculationWebmania® TaxesSet up your Tax ClassesTax reformIBS, CBS and the Selective TaxSecurityCertificate, data and Trust CenterWebmania® Trust CenterSecurity, privacy and subprocessors

Not sure where to start?

Book a demo →

Tax & Invoicing

Goods invoiceNF‑e, NFC‑e, CC‑e and MDeService invoiceNFS‑eTelecom invoiceNFComFiscal MonitorXML download

Logistics & Transport

Freight billCT‑e and CT‑e OSCargo manifestMDF‑eContent declarationDC‑eCIOT / PEF (ANTT)Freight payment

Payments & Management

GNREState tax payment slipDARE‑ICMS SPSão Paulo state ICMSDUA‑ESEspírito Santo payment slipB2B ManagementManage your companies
Ready for LLMs and SDKsAI-ready documentation, with official SDKsllms.txt# Webmania® documentation- NF‑e - NFS‑e Open llms.txt

Live status (in Portuguese): Webmania® Status · SEFAZ Monitor · City Hall Monitor

See all documentation →
Technology & SaaSThe tax layer of your software, through REST APIs.Learn more →Technology team
Retail & CommerceNFC‑e and NF‑e at the checkout and online, by API.Learn more →Retail operation
Logistics & TransportationCT‑e and MDF‑e built into your transportation system.Learn more →Logistics operation
EnterpriseHigh volumes, with VIP Support and governance.Learn more →Enterprise operation

By company size

Mid-sized CompaniesOperations that are scaling up

Other industries

ManufacturingNF‑e at the volume of your operationBanks & FintechsNFS‑e for fees and servicesServices & SubscriptionsNFS‑e at large scale

Not sure where to start?

Book a demo →

Webmania

About WebmaniaThe tax infrastructure and intelligence behind 100,000+ active company IDs (CNPJs).Meet Webmania →CustomersHow companies in different industries issue and monitor their tax documents.See our customers →ContactQuestions about operating in Brazil? Our team replies in your language.Talk to our team →

In numbers

15 million+tax documents per month
1.2 billion+API requests per year
100,000+active company IDs (CNPJs)
99.95%availability

Not sure where to start?

Book a demo →

Start here

Brazil tax guideNew to Brazil? The invoices, taxes and approvals of a sale, explained on one page.Start reading →

Go deeper

Complete guideEvery tax document in detail: when you need it, how to issue, cancel and correct it.Open the complete guide →

Goods and services

NF‑eElectronic invoiceNFC‑eConsumer receiptNFS‑eService invoiceNFComTelecom invoice

Transport

CT‑eFreight billMDF‑eCargo manifestCIOTRoad freight codeDC‑eContent declaration

Taxes and reform

Tax payment slipsGNRE, DARE and DUATax reformCBS and IBS, 2026–2033Tax ClassTax rules, set onceGlossaryTax terms, explained

Not sure which documents your operation needs?

Book a demo →
  • NFS-e REST API
  • Quick guide
    • NFS-e lifecycle
  • SDKs & LLMs
    • LLM-ready
    • Webmania SDKs
    • Modules
    • Examples
  • Authentication
  • City status
  • RPS batch and NFS-e
  • Notifications
    • Notification fields
      • RPS batch
      • NFS-e
    • Notification example
  • Issuing an invoice
    • Issuing example
    • Invoice information
      • Fields
      • RPS batch response
      • NFS-e response
    • RPS information
      • Service
        • Fields
        • Taxes
          • IBS/CBS
          • State IBS
          • City IBS
          • CBS
          • Presumed credit
          • Credit transfer
        • Intermediary
        • Government entity
        • Real estate
        • Movable goods
        • Tax base adjustment
        • Reimbursement/Pass-through
        • Deduction/Reduction
      • Service buyer
        • Brazilian
        • Foreign
      • Recipient
        • Brazilian
        • Foreign
      • Construction
      • Event activities
    • Providers
      • Abrasf
        • Items
      • Cecam
      • Conam
      • DSF
      • Equiplano
      • Florianópolis
      • Fortaleza
      • Governa
      • IPM
      • Osasco
      • National standard
      • São Paulo
      • SIGISS
      • Sigissweb
      • Thema
  • Tax reform NEW
    • Quick guide (ISS vs. IBS/CBS)
    • New fields
    • Changes to the national standard NFS-e
      • What changes in your integration
      • New codes
      • Foreign trade
      • Event activities
      • Upcoming changes (preview)
    • Changes to the São Paulo NFS-e (preview)
  • Functions
    • Download XML and PDF
      • Access credentials
      • Token
    • Look up an invoice
    • Cancel an invoice or scheduled issue
    • Replace an invoice
    • Acknowledge participation
  • Contingency mode
  • Infrastructure
  • Request limits
  • Changelog
⚡ Follow in real time (in Portuguese): Status | SEFAZ Monitor | City Hall Monitor

Last updated: November 27, 2026 · v3.3.1

Region and language

Brazil

  • PTPortuguês (Brasil)
  • ENEnglish
  • ESEspañol
View Markdown index (in Portuguese)
View Markdown indexLists the sections with links (in Portuguese)Open in ChatGPTReads the index and fetches only the sections it needsOpen in ClaudeReads the index and fetches only the sections it needs

Service Invoice REST API

Issue, look up, cancel and replace Brazilian service invoices (NFS-e)

NFS-e in more than 5,000 cities NFS-e in more than 5,000 cities

The Webmania® REST API issues the service invoice (NFS-e) with the city hall (prefeitura), through the system each city uses (its provider). It sends the result by notification, and it lets you look up, cancel and replace each invoice. Issuing is available for every city (list of cities in Portuguese). To start, read the Quick guide. To issue other document types, see all the APIs.

What is the NFS-e? The NFS-e (Nota Fiscal de Serviço eletrônica) is the electronic invoice for a service. Brazil has no single set of issuing rules for it: the rules depend on the provider of each city. A provider is the system a city hall uses to authorize service invoices.

City provider

Each city issues the NFS-e through a provider, such as Abrasf (a layout many cities share) or the national standard (Padrão Nacional). The provider sets the fields, the environments and the functions you can use. Check your city in City status.

RPS, RPS batch and NFS-e

Each item of rps (Recibo Provisório de Serviço, a provisional service receipt) holds the service and the service buyer (tomador) of one invoice. Depending on the provider, the response is a lote_rps or an nfse; see RPS batch and NFS-e.

Brazilian tax terms you will see. They keep their Brazilian names in the payload and on the NFS-e:
City hall (prefeitura): authorizes the NFS-e, through its own system (the provider) or the Padrão Nacional.
Padrão Nacional: the national NFS-e standard, which is replacing the city systems. Model padrao_nacional.
ISS (ISSQN): the city tax on services; each city sets its rate, between 2% and 5%. Rate in servico.impostos.iss; iss_retido says whether the buyer or an intermediary withholds it.
IBS / CBS: the new value-added taxes of the tax reform, shown separately from the price. Object ibs_cbs in servico.impostos.
CST / cClassTrib: the two codes that say how IBS and CBS apply. Fields situacao_tributaria and classificacao_tributaria of ibs_cbs.
PIS / COFINS: federal contributions on revenue, with their own CST (cst_pis_cofins, national standard only).
CNPJ / CPF: the company ID (14 digits) and the individual taxpayer ID (11 digits) of the provider and of the service buyer (tomador).
Every term in plain English: glossary of Brazilian tax terms.

Availability and security
High availability, scalability and redundant servers at the highest PCI DSS security level, on Amazon Web Services, the global leader in cloud computing.
Storage
Secure, encrypted and unlimited storage of your invoices on Amazon S3, which guarantees 99.999999999% durability of the XML files.
REST API integration
Works with every programming language through JSON. Low latency, with more than 200 points of presence on the Amazon Web Services network.
Automatic numbering
Issue invoices at the same time through the API, point of sale, online store and the Webmania® Panel. All numbering is managed and audited automatically.
Printed invoice and email delivery
The printable PDF of the invoice is created automatically and works with regular and thermal printers. The invoice is sent securely by email.
Expert support
Our support team, the Weblovers, are experts in accounting and programming and are here to help you.

Quick guide

Send every API request over HTTPS to the base URL https://api.webmania.com.br. The /2/ prefix means you are using version 2.0 of the API.

URL HTTP Verb Function
/2/nfse/emissao POST Issue an invoice
/2/nfse/substituir POST Replace an invoice
/2/nfse/manifestar PUT Acknowledge participation (national standard)
/2/nfse/consulta/{identifier} GET Look up an invoice
/2/nfse/status GET Get the status and features of the city provider
/2/nfse/cancelar PUT Cancel an invoice or a scheduled issue

Responses are JSON objects. Send Authorization: Bearer YOUR_ACCESS_TOKEN in every call, and Content-Type: application/json in calls with a body; see Authentication.

Check the HTTP status and the JSON body of every response:

  • Some validation errors return HTTP 200 with the error field.
  • Error responses can contain error, msg or message, depending on the step that refused the request.
  • HTTP 2xx does not mean the NFS-e was authorized: follow the status field and the notifications.

Example of an HTTP 401 response for a missing or invalid token (the message means “Restricted access. Token missing or invalid.”):

{
  "error": "Acesso restrito. Token não informado ou inválido."
}

How to integrate the NFS-e:

  1. Check the city With the Access Token in the Authorization header, send GET to /2/nfse/status. The response shows whether Webmania supports the city, and gives the provider, the environments, the authentication and the functions you can use.
  2. Choose between RPS batch and NFS-e The emissao field of the status lists lote_rps when the city accepts several RPS in one batch. Prepare your integration to receive both response models, lote_rps and nfse.
  3. Issue the NFS-e POST to /2/nfse/emissao. In tests, use ambiente = 2 when the provider offers a sandbox (test environment). Store the uuid of each invoice in your system.
  4. Receive the result Webmania sends the invoice result by POST to your url_notificacao. Without it, Webmania uses the notification URL set up in the company.
  5. Download the XML and PDF When the status is aprovado, download the XML and PDF of the NFS-e.
  6. Look up the invoiceif needed Use the uuid or your own ID to check the status at any time.
  7. Cancel or replaceif needed Cancel an approved invoice or a scheduled issue, or replace the invoice with a new one, depending on the provider functions.

Quick guide
NFS-e lifecycle

Every invoice gets a uuid as soon as the API accepts the issuing request. After that, it goes through the statuses below. They appear in the response, in the lookup and in the notifications:

NFS-e lifecycle When the API receives POST /2/nfse/emissao, the invoice stays in processando until the city provider returns the result. With data_agendamento, it stays in agendado until that date, and then it is issued automatically. If the provider stays offline, the invoice moves to contingencia and Webmania tries again automatically. The result is aprovado or reprovado. You can cancel an approved invoice with PUT /2/nfse/cancelar, or replace it with POST /2/nfse/substituir. In both cases it becomes cancelado. The replacement invoice is a new document, with its own UUID. You can also cancel a scheduled issue before its date. POST /2/nfse/emissao Scheduled agendado until data_agendamento Processing processando waiting for the provider Provider offline contingencia automatic retry Authorized aprovado invoice XML and PDF Rejected reprovado read motivo and fix it Canceled cancelado PUT /2/nfse/cancelar Replaced the old invoice becomes cancelado POST /2/nfse/substituir with data_agendamento on date offline retry cancel the scheduled issue
Cancellation or replacement Authorized Waiting for the result: not a final status Rejected Automatic retry
With synchronous providers, the issuing response already returns aprovado or reprovado. While the status is processando, contingencia or agendado, follow the invoice through the notification or the lookup. Do not issue it again.
StatusWhat it meansWhat to do
agendadoThe issue was scheduled with data_agendamento and was not sent to the provider yet.On that date, the invoice is issued automatically. To stop it, cancel the scheduled issue.
processandoThe provider has not returned the result yet: processing is asynchronous, or communication failed. Webmania checks with the provider or tries again automatically.Wait for the result notification or look up the invoice. Do not issue it again.
contingenciaThe provider is still offline. Webmania tries again automatically until it responds.Follow the same uuid and do not issue the invoice again. See Contingency mode.
aprovadoThe NFS-e was authorized. The xml and the PDFs become available depending on the provider; follow pdf_nfse_status.Download the XML and PDF. If needed, cancel or replace the invoice.
reprovadoThe provider rejected the invoice; motivo holds its reason.Fix the data shown in motivo and issue a new invoice.
canceladoThe approved invoice was canceled or replaced by another one. When you cancel a scheduled issue, the response also returns cancelado.Do not use this invoice. In a replacement, the new invoice has its own uuid.

In the RPS batch, the status processado means the batch was processed. The result of each invoice is in info_nfse[].status, and each invoice has its own uuid.

SDKs & LLMs

Take this reference to your AI assistant, integrate the API with an official SDK, or start from the ready-made modules and examples.

LLM-ready

Send an AI the section index of this reference: it reads the index and fetches only the sections it needs, in Markdown. The Markdown is in Portuguese; the assistant can answer in English.

  • Section index Start here Every section of this reference with its URL and size, so the AI reads only what it needs. View Markdown index
  • Page in Markdown The full reference in plain text, with the same tables and examples. View as Markdown
  • Open in ChatGPT Reads the index and fetches only the sections it needs. Open in ChatGPT
  • Open in Claude Reads the index and fetches only the sections it needs. Open in Claude
  • llms.txt Starting point for agents, with every public reference. Open llms.txt

Webmania SDKs

Official open-source SDKs on GitHub to integrate the Webmania APIs in the language of your project. Each repository includes installation, examples and the operations it covers.

  • Node.js / TypeScript Available

    Node.js >= 22 README

    git clone https://github.com/webmaniabr/webmania-node.git

  • Python Available

    Python >= 3.11 README

    git clone https://github.com/webmaniabr/webmania-python.git

  • PHP Available

    PHP >= 8.3 README

    git clone https://github.com/webmaniabr/webmania-php.git

  • Perl Available

    Perl 5.36 README

    git clone https://github.com/webmaniabr/webmania-perl.git

  • Go Available

    Go 1.26 README

    git clone https://github.com/webmaniabr/webmania-go.git

  • C Available

    C11, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-c.git

  • C++ Available

    C++, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-cpp.git

  • Lua Available

    Lua 5.4, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-lua.git

  • Dart Available

    Dart >= 3.8.3, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-dart.git

  • R Available

    R >= 4.6.2, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-r.git

  • Java Available

    Java 17+ README

    git clone https://github.com/webmaniabr/webmania-java.git

  • Kotlin Available

    Kotlin 2.4 / JVM 17+ README

    git clone https://github.com/webmaniabr/webmania-kotlin.git

  • Scala Available

    Scala 3.3 / JVM 17+ README

    git clone https://github.com/webmaniabr/webmania-scala.git

  • Clojure Available

    Clojure 1.12 / JVM 17+ README

    git clone https://github.com/webmaniabr/webmania-clojure.git

  • Ruby Available

    Ruby 3.3, Ruby 3.4 README

    git clone https://github.com/webmaniabr/webmania-ruby.git

  • .NET (C#) Available

    .NET 10 README

    git clone https://github.com/webmaniabr/webmania-dotnet.git

  • PowerShell Available

    PowerShell 7.6 README

    git clone https://github.com/webmaniabr/webmania-powershell.git

  • Elixir Available

    Elixir ~> 1.18, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-elixir.git

  • Rust Available

    Rust >= 1.85 README

    git clone https://github.com/webmaniabr/webmania-rust.git

  • Haskell Available

    GHC 9.6.7, Linux arm64 README

    git clone https://github.com/webmaniabr/webmania-haskell.git

  • Swift Available

    macOS 13+, iOS 16+ README

    git clone https://github.com/webmaniabr/webmania-swift.git

Modules

Official modules to issue invoices in one click from your online store, with no coding.

  • WooCommerce Official Webmania® module. Download

Examples

Test the REST API without writing a line of code, and speed up your integration with the official Webmania® tools.

  • Postman collection Instant tests Ready-made requests to test the API without writing code. Open in Postman
  • Video Test the REST API without a line of code (in Portuguese). Watch on YouTube

Authentication

To use the API, authenticate every request with the HTTP Authorization header, in this format:

Authorization: Bearer YOUR_ACCESS_TOKEN

You find the API 2.0 Access Token in the Webmania® Panel. Include it in every request. Send the request body in JSON, with the Content-Type and Accept headers set to application/json.

Keep your access credentials safe. Never publish the Access Token in the source code of a website, app or system where others can easily read it.

For mobile apps (iOS and Android), we recommend issuing on your server (back end). The app code should only send the issuing request, and the processing should happen on your server.

City status

The features and functions available to issue an NFS-e depend on the rules of each city's provider. A provider is the system a city hall uses to authorize service invoices. Check the status before you integrate. It tells you whether Webmania® supports (has certified) the city, and gives the provider, the environments, the authentication, the issuing models and the functions you can use.

To check the status of the city in the company address, send a GET request to the URL /2/nfse/status.

  curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
https://api.webmania.com.br/2/nfse/status

On success, the response returns status, modelo, versao, ambientes, autenticacao, emissao and funcoes. The fields codigo_servico and parametros_disponiveis depend on the available information. A failure can return status: false and error, without the other fields.

What to checkFieldWhat it is for
Webmania supports the citystatusWith false, Webmania® does not support the city yet. New environments are certified on request.
There is a test environmentambientesWith 2 in the list, use ambiente = 2 in tests. Some providers have no sandbox (test environment).
How the company authenticates with the providerautenticacaoSet up the method in the company, through the API or the Webmania® Panel.
How to issueemissaoLists nfse. When the city accepts several RPS in one batch, it also lists lote_rps; see RPS batch and NFS-e.
What you can do afterwardsfuncoesLook up, cancel and replace, depending on the provider.

Response fields:

Parameter Type Description
status boolean Shows whether Webmania® supports (has certified) the city
New environments are certified on request.
modelo string Provider model used by the city
versao string XML version of the provider
API parameters can change with the XML version.
ambientes array Environments available under the provider rules
1 - Production
2 - Sandbox

Note: Some providers have no sandbox (test environment).
autenticacao array Authentication available under the provider rules
certificado_a1
login_senha
token
Set up the authentication method in the company, through the API or the Webmania® Panel. Learn more
emissao array Models available under the provider rules
lote_rps
nfse

Note: The issuing type and the response change with each model. Learn more
funcoes array Functions available under the provider rules
consultar
cancelar
substituir
codigo_servico array Service codes available to the company, based on its CNAE (economic activity code), with suggested tax rates.
parametros_disponiveis object Parameters available for the model the city uses, and whether each one is required.
obrigatorio - Required
obrigatorio_pf - Required for individuals
obrigatorio_pj - Required for companies
opcional - Optional

Note: The field is returned when the provider publishes this list of parameters. Which parameters exist, and which are required, depends on the provider.

Example of an HTTP 200 response:

{
  "status": true, // City supported
  "modelo": "abrasf", // City provider
  "versao": "2.02", // Certified version
  "ambientes": [ 1, 2 ], // Environments available for issuing
  "autenticacao": [ "certificado_a1" ], // Authentication method
  "emissao": [ "lote_rps", "nfse" ], // Models available for issuing
  "funcoes": [ "consultar", "cancelar", "substituir" ], // Available functions
  "codigo_servico": [
    {
      "codigo": "0000", // Service code
      "descricao": "Serviço 1", // Service description
      "codigo_tributacao": "000000000", // City tax code of the service, when available
      "aliquota_sugerida": {
        "iss": 5 // Suggested ISS rate
      }
    },
    {
      "codigo": "0000", // Service code
      "descricao": "Serviço 2", // Service description
      "aliquota_sugerida": {
        "iss": 2 // Suggested ISS rate
      }
    },
    ...
  ],
  "parametros_disponiveis": {
    "empresa.cnpj": "obrigatorio_pj", // For a company, the CNPJ is required in the company settings
    "servico.valor_servicos": "obrigatorio", // The service amount is required
    "tomador.cpf": "obrigatorio_pf", // For an individual, the CPF of the service buyer is required
    "tomador.email": "opcional", // The email of the service buyer is optional
    ...
  }
 }

About RPS batch and NFS-e

Issuing returns an RPS batch (a group of provisional service receipts, Lote RPS) or the issued NFS-e. This depends on the number of RPS in the request and on the city provider. Webmania always prefers synchronous issuing, in real time, for a better experience. Prepare your integration to receive both models, lote_rps and nfse:

RPS batch or NFS-e? The response model depends on the number of RPS in the request. With a single RPS, the response is nfse, a single document. With providers that use batches even for one invoice, it is lote_rps. With more than one RPS, up to 50 per request, the city must accept batch sending. The emissao field of the status shows this with the value lote_rps. In that case the response is lote_rps, with each invoice in info_nfse. If not, the API refuses the request. In every model, confirm the result of each invoice by its status: in the response, in the notification and in the lookup. POST /2/nfse/emissao How many RPS in the request? Response in the nfse model single document; lote_rps if the provider batches even one invoice Does the city accept batches? emissao includes lote_rps in City status Bulk sending lote_rps response invoices in info_nfse Request refused more than 1 RPS not allowed Result of each invoice by status: in the response, the notification and the lookup One More than one (up to 50) Yes No
Response model Check Refused by the API Your application
The lote_rps or nfse model does not show, by itself, the authorization result. When the city does not accept batches, the API responds O município não permite o envio de mais de 1 RPS por requisição (the city does not allow more than 1 RPS per request).
Model Sending Description
lote_rps depends on the provider The RPS batch response can come when you issue invoices in bulk, or when the provider uses batches even for a single invoice. The batch can be processed synchronously or asynchronously, depending on the provider. The lote_rps model does not show, by itself, the authorization result.
Bulk sending: limit of 50 invoices (when available)
nfse depends on the processing The response in the NFS-e model identifies a single document. The first response can show that the invoice is still processing. Confirm the authorization by the status field, the lookup and the notifications, not only by the nfse model.

Notifications

To keep your platform up to date, Webmania® sends automatic notifications for invoice results and for updates of the DANFS-e (the printed NFS-e summary), all in the same format. With them, you do not need to poll the API for each invoice: wait for the webhook and update the invoice in your system when it arrives.

The notification is a POST request with a JSON body. It goes to the URL you send in url_notificacao when you issue the invoice. Without that parameter, it goes to the notification URL saved in the company settings. The update of the city hall PDF (pdf_nfse_status = processado) is notified only to the url_notificacao sent with the issue request. When present, the atualizado_em field gives the time of the last update in ISO-8601 format. Not every notification flow includes this field.

Notified statusWhen it is sent
processandoMay come in the issuing response, when the provider has not given the result yet. It is not the final result: wait for the next notification.
aprovadoThe NFS-e was authorized, in the issuing response or after automatic processing.
reprovadoThe NFS-e was rejected, in the issuing response or after automatic processing. The body includes the motivo (reason).
processadoThe RPS batch was processed. Each invoice comes in info_nfse, with its own status.
canceladoThe cancellation of an authorized invoice is complete. This also applies when the invoice is replaced by another one.
When there is no notification. A scheduled issue (agendado), the cancellation of a scheduled issue and the change to contingencia are not notified. Automatic retries notify only the final result. In these cases, do not issue the invoice again: wait for the next notification or check the status with a lookup. If the issue request has no url_notificacao and the company has no saved URL, no notification is sent.
Delivery order: successive notifications for the same document (same UUID) may arrive in any order. Your platform must reconcile the statuses in an idempotent way. When present, use atualizado_em (ISO-8601) to compare updates and discard older notifications. Without this field, look up the invoice to confirm its current state.

Each invoice has a unique ID called the UUID. Use it to receive and identify the invoice and to update the data in your database.

What is the UUID? The UUID (Universally Unique Identifier) is a unique 36-character ID, in the 8-4-4-4-12 format, that Webmania assigns to each invoice. The RPS batch has its own UUID, and each NFS-e in info_nfse also has its own UUID. Use info_nfse[].uuid to identify an invoice inside the batch.

It is created as soon as our API receives the request successfully, that is, after it passes our validations and before anything is sent to the provider or the authorizing body. So the UUID exists whatever the status of the invoice. This applies to processando, aprovado, agendado, reprovado, cancelado and contingencia.

Once created, the UUID is permanent: it does not change on retries or resends. An NFS-e issued to replace another one is a new document and gets its own UUID, different from the UUID of the replaced invoice.

The access key is a different field from the UUID. Use the UUID in the operations that accept this ID (for example, the lookup by uuid). Use the access key in the fields that the API documents as a key (for example, manifestar and nfses_referenciadas require the access key).

Notifications
Notification fields

The notification body follows the document model, with the fields of the issuing response (RPS batch response and NFS-e response):

ModelWhen it is usedFields
lote_rpsBulk issuing, or a provider that uses batches even for a single invoice. Each invoice of the batch comes in info_nfse, with its own uuid.RPS batch
nfseSingle document.NFS-e

Depending on the status and the data available, some fields may be missing from the body. The full examples are in Notification example.

Notifications > Notification fields
RPS batch

Notification in the lote_rps model. Depending on the status and the data available, the body may include uuid, modelo, status, motivo, numero_lote, serie_lote, quantidade_rps, protocolo, info_nfse, log and, when available, atualizado_em.

RPS batch notification
Parameter Type Description
uuid string Unique ID of the RPS batchUse the UUID to find the batch the notification is about.
modelo string Response model
lote_rps
status string Status of the RPS batch
processando
processado
agendado
reprovado
cancelado
contingencia
motivo string Reason for the status of the RPS batch
E.g.: Lote processado com sucesso (batch processed successfully)
numero_lote string RPS batch number
serie_lote string RPS batch series
quantidade_rps number Number of NFS-e in the RPS batch
protocolo string RPS batch protocol
info_nfse array List and result of every invoice in the RPS batch
Each item has its own UUID and the available ID, status and file fields of the NFS-e. Not every field of the single-invoice response is included. Learn more
log object Response log from the city hall
atualizado_em date and time Date and time of the last update in ISO-8601 format, when included in the response

Notifications > Notification fields
NFS-e

Notification in the nfse model. Depending on the status and the data available, the body may include uuid, modelo, status, motivo, numero, codigo_verificacao, serie_rps, numero_rps, xml, pdf_nfse, pdf_nfse_status, pdf_rps, log and, when available, atualizado_em.

NFS-e notification
Parameter Type Description
uuid string Unique ID of the invoiceUse the UUID to find the invoice the notification is about.
modelo string Response model
nfse
status string Status of the invoice
processando
aprovado
agendado
reprovado
cancelado
contingencia
motivo string Reason for the status of the invoice
E.g.: Autorizado o uso da NFS-e (use of the NFS-e authorized)
numero string Invoice number
Managed automatically by the city hall.
codigo_verificacao string Verification code of the invoice
serie_rps string RPS series
numero_rps string RPS number
xml string URL of the invoice XML
pdf_nfse string URL of the invoice PDF
when the city hall provides it
pdf_nfse_status string Status of the invoice PDF
when the city hall provides it
status:
processando
processado
indisponivel
pdf_rps string URL of the PDF of the provisional receipt (RPS) of the invoice
log object Response log from the city hall
atualizado_em date and time Date and time of the last update in ISO-8601 format, when included in the response

Notifications
Notification example

The notification is sent with the POST method, in application/json format:

-X POST \
-header "Content-type: application/json" \

Example notification for a processed RPS batch (lote_rps model):

{
    "uuid": "00000000-0000-0000-0000-000000000000",
    "modelo": "lote_rps",
    "status": "processado",
    "motivo": "Lote processado com sucesso",
    "numero_lote": "0000",
    "serie_lote": "A0",
    "quantidade_rps": 2,
    "protocolo": "000000000000000",
    "info_nfse": [
        {
            "uuid": "00000000-0000-0000-0000-000000000000",
            "modelo": "nfse",
            "status": "aprovado",
            "motivo": "Autorizado o uso da NFS-e",
            "numero": "00",
            "codigo_verificacao": "000000000",
            "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
            "pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]",
            "pdf_nfse_status": "processado",
            "pdf_rps": "https://api.webmania.com.br/darps/[uuid]"
        },
        {
            "uuid": "00000000-0000-0000-0000-000000000000",
            "modelo": "nfse",
            "status": "aprovado",
            "motivo": "Autorizado o uso da NFS-e",
            "numero": "00",
            "codigo_verificacao": "000000000",
            "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
            "pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]",
            "pdf_nfse_status": "processando",
            "pdf_rps": "https://api.webmania.com.br/darps/[uuid]"
        }
    ],
    "log": { ... },
    "atualizado_em": "2024-01-01T12:00:00-03:00"
}

Example notification for an authorized NFS-e (nfse model):

{
    "uuid": "00000000-0000-0000-0000-000000000000",
    "modelo": "nfse",
    "status": "aprovado",
    "motivo": "Autorizado o uso da NFS-e",
    "numero": "00",
    "codigo_verificacao": "000000000",
    "serie_rps": "A0",
    "numero_rps": 00,
    "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
    "pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]",
    "pdf_nfse_status": "indisponivel",
    "pdf_rps": "https://api.webmania.com.br/darps/[uuid]",
    "log": { ... },
    "atualizado_em": "2024-01-01T12:00:00-03:00"
}

Issuing an invoice

Issuing sends the RPS of the request to the city provider. An RPS (provisional service receipt) holds the service and the service buyer (tomador) of one invoice. The response comes in the lote_rps or nfse model, depending on the provider; see RPS batch and NFS-e. One request accepts up to 50 RPS. Sending more than one RPS works only in cities that support lote_rps.

To issue a service invoice, send a POST request to the URL /2/nfse/emissao, with a JSON body.

How to build the request:

  1. Fill in the general data The ambiente (2 for tests, when the provider offers a sandbox), the url_notificacao and, if you want, your own control ID and the data_agendamento.
  2. Describe the service In each item of rps, the servico object with discriminacao, valor_servicos and the taxes, or the classe_imposto (Tax Class) set up in the Webmania® Panel.
  3. Identify the service buyer In the tomador object, the data of the party that pays for the service, such as cpf and nome_completo.
  4. Check the provider fields Some providers ask for extra fields; see Providers and the parametros_disponiveis field in City status.
  5. Add the optional groupsif needed Construction, event activities, intermediary and the other RPS groups, when they apply.

Request example:

  curl -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ambiente": 1,
    "rps": [...]
  }' \
  https://api.webmania.com.br/2/nfse/emissao

Example body of a simplified issue, with a Tax Class. The values are only examples: replace the CPF, the Tax Class reference and the notification URL with the data of your integration.

{
  "ambiente": 2,
  "url_notificacao": "http://meudominio.com/retorno.php",
  "rps": [
    {
      "servico": {
        "valor_servicos": "15.00",
        "discriminacao": "Prestação de Serviço referente ao mês X",
        "classe_imposto": "REF000000"
      },
      "tomador": {
        "cpf": "000.000.000-00",
        "nome_completo": "Nome do tomador"
      }
    }
  ]
}

The response is a JSON object in the lote_rps or nfse model, described in RPS batch response and NFS-e response. The fields depend on the status, the provider and the available data, and empty fields can be left out. The examples show success responses; they do not guarantee that every field is always present.

If the response returns processando or contingencia, the invoice has no final result yet. Wait for the notification, sent by POST to the url_notificacao, and do not issue it again. The statuses are in NFS-e lifecycle.

Issuing an invoice
Invoice information

Fields at the first level of the issuing body. Fill them in for the purpose of your issue; the fields with a link open the section of each object.

Parameter NFS-e Type Size Description
ID
string 1-15 Purchase order number or processing ID
Tracks issuing requests by order or processing ID. Learn more (in Portuguese)
ambiente
number 1 Environment of the invoice
1 - Production
2 - Sandbox
Whether a sandbox (test environment) exists depends on the provider of each city. Check the status to confirm.
rps
array 1-50 Data of the service and the service buyer of each invoice, up to 50 NFS-e per request.
Only cities that support lote_rps accept bulk sending. Check the status to confirm.
url_notificacao
string --- Notification URL for every status update of the invoice
data_agendamento
date and time --- Sets the date and time to schedule the issue of the invoice. The date must be the same as or later than the moment of validation. Cancel a scheduled issue
Format:
YYYY-MM-DD HH:MM:00

Issuing an invoice > Invoice information
RPS batch response

In bulk issuing, or when the provider uses batches even for a single invoice, issuing returns the RPS batch (Lote RPS). It has the fields uuid, modelo, status, motivo, numero_lote, quantidade_rps, protocolo, info_nfse and log. Each invoice of the batch, with its own uuid, comes in info_nfse.

RPS batch response
Parameter Type Description
uuid string Unique ID of the RPS batchUse the UUID to match the notification you receive.
modelo string Response model
lote_rps
status string RPS batch status
processando
processado
agendado
reprovado
cancelado
contingencia
motivo string Reason for the RPS batch status
E.g.: Lote processado com sucesso (batch processed successfully)
numero_lote string RPS batch number
serie_lote string RPS batch series
quantidade_rps number Number of NFS-e in the RPS batch
protocolo string RPS batch protocol
info_nfse array List and response of every invoice in the RPS batch
Each item has its own UUID and the available ID, status and file fields of the NFS-e. Not every field of the single-invoice response is included. Learn more
log object Response log of the city hall

Example of an HTTP 200 response in the lote_rps model:

{
  "uuid": "00000000-0000-0000-0000-000000000000", // Unique ID
  "modelo": "lote_rps", // Response model (nfse, lote_rps)
  "status": "processado", // processando, processado, agendado, reprovado, cancelado, contingencia
  "motivo": "Lote processado com sucesso", // Reason for the status
  "numero_lote": "0000", // RPS batch number
  "serie_lote": "A0", // RPS batch series
  "quantidade_rps": 2, // Number of NFS-e in the RPS batch
  "protocolo": "000000000000000", // RPS batch protocol
  "info_nfse": [
    {
      "uuid": "00000000-0000-0000-0000-000000000000", // NFS-e UUID
      "modelo": "nfse", // NFS-e model
      "status": "aprovado", // NFS-e status
      "motivo": "Autorizado o uso da NFS-e", // Reason for the NFS-e status
      "numero": "00", // NFS-e number
      "codigo_verificacao": "000000000", // NFS-e verification code
      "xml": "https://api.webmania.com.br/xmlnfse/[uuid]", // NFS-e XML
      "pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]", // City hall PDF of the NFS-e (when available)
      "pdf_nfse_status": "processado", // Status of the city hall PDF (when available)
      "pdf_rps": "https://api.webmania.com.br/darps/[uuid]", // RPS PDF of the NFS-e
    }
  ],
  "log": { ... } // Response log of the city hall
}

When you send url_notificacao, Webmania sends the result by POST to that URL, in the lote_rps model. See Notifications › RPS batch.

Issuing an invoice > Invoice information
NFS-e response

When the response identifies a single document, issuing returns the NFS-e. It has the fields uuid, modelo, status, motivo, numero, codigo_verificacao, serie_rps, numero_rps, xml, pdf_nfse, pdf_nfse_status, pdf_rps and log.

NFS-e response
Parameter Type Description
uuid string Unique ID of the invoiceUse the UUID to match the notification you receive.
modelo string Response model
nfse
status string Invoice status
processando
aprovado
agendado
reprovado
cancelado
contingencia
motivo string Reason for the invoice status
E.g.: Autorizado o uso da NFS-e (use of the NFS-e authorized)
numero string Invoice number
Managed automatically by the city hall.
codigo_verificacao string Verification code of the invoice
serie_rps string RPS series
numero_rps string RPS number
xml string URL of the invoice XML
pdf_nfse string URL of the invoice PDF
when the city hall provides it
pdf_nfse_status string Status of the invoice PDF
when the city hall provides it
status:
processando
processado
indisponivel
pdf_rps string URL of the PDF of the provisional receipt (RPS) of the invoice
log object Response log of the city hall

Example of an HTTP 200 response in the nfse model. The first response can return processando: confirm the authorization by the status field.

{
  "uuid": "00000000-0000-0000-0000-000000000000", // NFS-e UUID
  "modelo": "nfse", // NFS-e model
  "status": "aprovado", // processando, aprovado, agendado, reprovado, cancelado, contingencia
  "motivo": "Autorizado o uso da NFS-e", // Reason for the NFS-e status
  "numero": "00", // NFS-e number
  "codigo_verificacao": "000000000", // NFS-e verification code
  "serie_rps": "A0", // RPS series of the NFS-e
  "numero_rps": 00, // RPS number of the NFS-e
  "xml": "https://api.webmania.com.br/xmlnfse/[uuid]", // NFS-e XML
  "pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]", // City hall PDF of the NFS-e (when available)
  "pdf_nfse_status": "processado", // Status of the city hall PDF (when available)
  "pdf_rps": "https://api.webmania.com.br/darps/[uuid]", // RPS PDF of the NFS-e
  "log": { ... } // Response log of the city hall
}

When you send url_notificacao, Webmania sends the result by POST to that URL, in the nfse model. See Notifications › NFS-e.

Issuing an invoice
RPS information

The RPS (Recibo Provisório de Serviço, a provisional service receipt) holds the data of one service. Each item of the rps array, from the Invoice information table, becomes one invoice.

Parameter NFS-e Type Size Description
servico
object --- Service information
tomador
object --- Service buyer information
construcao_civil
object --- Construction information

Example of rps for bulk issuing. Replace the example values with those of your integration. Sending more than one RPS depends on provider support for lote_rps:

{
  ...
  "rps": [
    {
      "servico": {
        "valor_servicos": "15.00",
        "discriminacao": "Prestação de Serviço referente ao mês X",
        "classe_imposto": "REF000000"
      },
      "tomador": {
        "cpf": "000.000.000-00",
        "nome_completo": "Nome do tomador"
      }
    },
    {
      "servico": {
        "valor_servicos": "25.00",
        "discriminacao": "Prestação de Serviço referente ao mês Y",
        "classe_imposto": "REF000000"
      },
      "tomador": {
        "cpf": "000.000.000-00",
        "nome_completo": "Nome do tomador"
      }
    }
  ]
}

Issuing an invoice > RPS
Service

The service data goes in the servico object of each RPS (provisional service receipt), as shown in the RPS information table.

Note: Each provider (the system a city hall uses to authorize NFS-e) may ask for extra fields in the RPS. Find the provider of your city in the city status. Then check which extra fields are available or required. Learn more
Parameter NFS-e Type Size Description
discriminacao
string 1-2000 Service description
valor_servicos
string 15v2 Total amount of the services provided
0.00
classe_imposto
string 5+ Automatic tax setup: in servico.classe_imposto, send the reference of the Tax Class created in the Webmania® Panel
REF0000
impostos
object --- Tax setup in the API, for transactions that need more flexibility
iss_retido
number 1 *Required if no Tax Class is sent
Whether the ISS (the city tax on services; each city sets its rate) is withheld, that is, paid by the buyer or an intermediary instead of the service provider
1 - Yes
2 - No
responsavel_retencao_iss
number 1 *Required if the ISS is withheld
Party that withholds the ISS
1 - Service buyer (tomador)
2 - Intermediary
deducoes
string 15v2 Amount deducted from the tax base
0.00
desconto_incondicionado
string 15v2 Unconditional discount amount
0.00
desconto_condicionado
string 15v2 Conditional discount amount
0.00
outras_retencoes
string 15v2 Amount of other withholdings
0.00
numero_processo
string 1-30 Number of the court or administrative case that suspends the ISS liability (exigibilidade)
intermediario
object --- Data of the service intermediary

Example of a service sent without a Tax Class:

Issuing an invoice > RPS > Service
Taxes

The taxes go in the impostos object, inside servico.

Use the automatic tax calculation with a Tax Class set up in the Webmania® Panel. In this case, send only the classe_imposto parameter, with the reference (REF) of the Tax Class.

Important: taxes vary by provider:
  • National standard (Padrão Nacional) (model padrao_nacional): send servico.impostos.iss when it applies to how the service is taxed. The API accepts this rate, and the servico.tributacao_iss indicator does not replace it. When they apply, also use impostos.cst_pis_cofins and impostos.ibs_cbs.
  • City providers (e.g. IPM): keep sending impostos.iss as the city or provider requires.

To find the provider of your city, call /2/nfse/status and check the modelo field. See also the Providers section.

Parameter NFS-e Type Size Description
servico.classe_imposto
string 5+ Automatic tax setup: send the Tax Class reference in servico, not inside impostos.
REF0000
ibs_cbs NEW
object --- IBS and CBS taxation data: the new value-added taxes of the tax reform, calculated on the service and shown separately from the price
iss
string <100; up to 4 decimals ISS rate, with a dot as the decimal separator.
Note: In the national standard (model padrao_nacional), the API accepts servico.impostos.iss when it applies to how the service is taxed. The servico.tributacao_iss indicator does not replace it.
0.00
iss_simples_nacional
string 3v2 ISSQN rate (Simples Nacional, partial exemption)
Note: Available for the CONAM provider.
0.00
reducao
string 3v2 Percentage reduction of the tax base
Note: Available only for the national standard (model padrao_nacional).
0.00
identificador_beneficio_municipal is required when reducao is sent.
cst_pis_cofins
string 2 CST (tax status code) of PIS/COFINS. PIS and COFINS are federal contributions on revenue; the CBS replaces them from 2027.
Note: Available only for the national standard
00 - None
01 - Taxable transaction at the basic rate
02 - Taxable transaction at a differentiated rate
03 - Taxable transaction at a rate per product unit of measure
04 - Single-phase taxable transaction - Resale at zero rate
05 - Taxable transaction under tax substitution
06 - Taxable transaction at zero rate
07 - Transaction exempt from the contribution
08 - Transaction not subject to the contribution
09 - Transaction with the contribution suspended
49 - Other outgoing transactions
50 - Transaction with right to credit - Linked only to taxed revenue in the domestic market
51 - Transaction with right to credit - Linked only to untaxed revenue in the domestic market
52 - Transaction with right to credit - Linked only to export revenue
53 - Transaction with right to credit - Linked to taxed and untaxed revenue in the domestic market
54 - Transaction with right to credit - Linked to taxed revenue in the domestic market and export revenue
55 - Transaction with right to credit - Linked to untaxed revenue in the domestic market and export revenue
56 - Transaction with right to credit - Linked to taxed and untaxed revenue in the domestic market and export revenue
60 - Presumed credit - Purchase linked only to taxed revenue in the domestic market
61 - Presumed credit - Purchase linked only to untaxed revenue in the domestic market
62 - Presumed credit - Purchase linked only to export revenue
63 - Presumed credit - Purchase linked to taxed and untaxed revenue in the domestic market
64 - Presumed credit - Purchase linked to taxed revenue in the domestic market and export revenue
65 - Presumed credit - Purchase linked to untaxed revenue in the domestic market and export revenue
66 - Presumed credit - Purchase linked to taxed and untaxed revenue in the domestic market and export revenue
67 - Presumed credit - Other transactions
70 - Purchase without right to credit
71 - Purchase with exemption
72 - Purchase with suspension
73 - Purchase at zero rate
74 - Purchase not subject to the contribution
75 - Purchase under tax substitution
98 - Other incoming transactions
99 - Other transactions
pis
string 3v2 PIS rate
0.00
cofins
string 3v2 COFINS rate
0.00
inss
string 3v2 INSS rate (social security)
0.00
ir
string 3v2 IR rate (income tax)
0.00
csll
string 3v2 CSLL rate (social contribution on net profit)
0.00
cp
string 3v2 CP rate (employer social security contribution, Contribuição Patronal)
Note: Available only for the national standard
0.00

Issuing an invoice > RPS > Service > Taxes
IBS/CBS

Note:

The tax reform creates two new taxes on goods and services: IBS, shared by states and cities, and CBS, a federal tax. Showing IBS and CBS on the invoice starts first for companies under the actual profit (Lucro Real) and presumed profit (Lucro Presumido) regimes. For the other tax regimes, such as Simples Nacional (small business regime: several taxes in one monthly payment), it will come gradually, as each city enables it in its system.

For more information, see the "Tax reform" section.

To add the new taxes to your invoices, add the ibs_cbs object to rps[].servico.impostos, when the provider supports it.

The table below lists the parameters of this object. Without servico.classe_imposto, send situacao_tributaria and classificacao_tributaria whenever you send ibs_cbs. With a Tax Class, these codes can come from the Tax Class settings.

Parameter NFS-e Type Size Description
situacao_tributaria
string 3 CST (tax status code) of IBS and CBS. Together with the cClassTrib, it says how IBS and CBS apply. Required when you send ibs_cbs without servico.classe_imposto.
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
classificacao_tributaria
string 6 cClassTrib (tax classification code) of IBS and CBS: standard rate, reduced rate, exemption and so on. Required when you send ibs_cbs without servico.classe_imposto.
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
situacao_tributaria_regular
string 3 CST (tax status code) of IBS and CBS under the regular regime.
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
Required for transactions that must be taxed under the regular regime.
classificacao_tributaria_regular
string 6 cClassTrib (tax classification code) of IBS and CBS under the regular regime.
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
Required when situacao_tributaria_regular is sent; send the codes that apply to the provider and the transaction.
ibs_estadual
object - State IBS taxation data
ibs_municipal
object - City IBS taxation data
cbs
object - CBS taxation data
credito_presumido
array - IBS and CBS presumed credit data
transferencia_credito
array - IBS and CBS credit transfer data

Example of IBS and CBS taxation:

{
  "rps": [
    {
      ...
      "tomador": {...},
      "servico": {
        "valor_servicos": "15.00",
        "discriminacao": "Prestação de Serviço referente ao mês X",
        ...
        "impostos": {
          "iss": "2.00",
          "ibs_cbs": {
            "situacao_tributaria": "000",
            "classificacao_tributaria": "000001",
            "ibs_estadual": {...},
            "ibs_municipal": {...},
            "cbs": {...}
          }
        }
      }
    }
  ]
}

Issuing an invoice > RPS > Service > Taxes
State IBS

For the state IBS taxation data, add the ibs_estadual object inside ibs_cbs.

The table below lists the parameters of this object, when the provider supports them:

Parameter NFS-e Type Size Description
aliquota_diferimento
number or numeric string 0–100 Deferral percentage, from 0 to 100. Deferral postpones payment of the tax to a later stage. The precision sent to the city depends on the provider.
Required when the CST = 510
valor_devolvido
string 13v2 Amount of tax refunded

Example of state IBS:

"ibs_estadual": {
  "aliquota_diferimento": "5.00", // Deferral percentage
  "valor_devolvido": "10.00" // Amount of tax refunded
}

Issuing an invoice > RPS > Service > Taxes
City IBS

For the city IBS taxation data, add the ibs_municipal object inside ibs_cbs.

The table below lists the parameters of this object, when the provider supports them:

Parameter NFS-e Type Size Description
aliquota_diferimento
number or numeric string 0–100 Deferral percentage, from 0 to 100. The precision sent to the city depends on the provider.
Required when the CST = 510
valor_devolvido
string 13v2 Amount of tax refunded
0.00

Example of city IBS:

"ibs_municipal": {
  "aliquota_diferimento": "50.00", // Deferral percentage
  "valor_devolvido": "10.00" // Amount of tax refunded
}

Issuing an invoice > RPS > Service > Taxes
CBS

For the CBS data, add the cbs object inside ibs_cbs.

The table below lists the parameters of this object, when the provider supports them:

Parameter NFS-e Type Size Description
aliquota_diferimento
number or numeric string 0–100 Deferral percentage, from 0 to 100. The precision sent to the city depends on the provider.
Required when the CST = 510
valor_devolvido
string 13v2 Amount of tax refunded
0.00

Example of CBS:

"cbs": {
  "aliquota_diferimento": "50.00", // Deferral percentage
  "valor_devolvido": "10.00" // Amount of tax refunded
}

Issuing an invoice > RPS > Service > Taxes
Presumed credit

A presumed credit lets the company use tax credits in specific situations. To use it, add the credito_presumido array inside the ibs_cbs field.

The table below lists the parameters you can send inside the array:

Parameter NFS-e Type Size Description
classificacao
string 1-2 Presumed credit classification code
See the classification table below
aliquota_ibs
string 2v4 Presumed credit percentage for IBS
aliquota_cbs
string 2v4 Presumed credit percentage for CBS
Presumed credit classifications
Code Description Applies to
3 Purchase of materials for recycling IBS and CBS
4 Used movable goods for resale IBS and CBS
5 Automotive regime - Art. 310 CBS
6 Automotive regime - Art. 311 CBS
7 Manaus Free Trade Zone (Zona Franca de Manaus) - Art. 444 IBS
10 Manaus Free Trade Zone (Zona Franca de Manaus) - Art. 450 CBS
11 Free Trade Area (Área de Livre Comércio) - Art. 462 IBS
13 Free Trade Area (Área de Livre Comércio), industry - Art. 467 CBS

Example of a presumed credit:

"credito_presumido": {
  "classificacao": "5", // Classification code
  "aliquota_ibs": "0.10", // IBS percentage
  "aliquota_cbs": "0.05" // CBS percentage
}

Issuing an invoice > RPS > Service > Taxes
Credit transfer

When IBS and CBS credits are transferred (CST 800), add the transferencia_credito array inside the ibs_cbs field:

The table below lists the parameters you can send inside the array:

Parameter NFS-e Type Size Description
valor_ibs
string 13v2 IBS amount to transfer
0.00
valor_cbs
string 13v2 CBS amount to transfer
0.00

Example of a credit transfer:

"transferencia_credito": {
  "valor_ibs": "2.50", // IBS amount to transfer
  "valor_cbs": "4.00" // CBS amount to transfer
}

Issuing an invoice > RPS > Service
Intermediary

Send the details of the service intermediary in the intermediario object, inside servico.

Parameter NFS-e Type Size Description
cpf
Individual
string 11 CPF, the 11-digit individual taxpayer ID
000.000.000-00
nome_completo
Individual
string 2-150 Full name
cnpj
Company
string 14 CNPJ, the 14-digit company ID (each branch has its own)
00.000.000/0000-00
razao_social
Company
string 2-150 Legal name
im
string 1-15 Inscrição Municipal (IM), the city registration of a company that provides services and pays ISS
cidade
string 1-40 City of the intermediary.
Required for the Abrasf model, version 2.04
uf
string 2 State (UF) of the intermediary.
Required for the Abrasf model, version 2.04

Issuing an invoice > RPS > Service
Government entity

Notice - Tax reform:

The parameters in this section belong to the tax reform. No environment of the National Portal can receive these new parameters yet. If you choose to send them, they are only validated. They do not appear in the XML of the invoice.

To learn when these fields become available, see the "Tax reform" section.

Fill in the rps[].servico.ente_governamental object when the service is provided to the direct public administration, or to its agencies (autarquias) or foundations. The table below lists the parameters of this object:

Parameter NFS-e Type Size Description
tipo
number 1 Category of the government entity
1 - Federal government (União)
2 - State
3 - City
4 - Federal District
9 - Other (describe)
classificacao
string 1-100 Additional classification of the entity.
Required when tipo = 9 (Other).

Issuing an invoice > RPS > Service
Real estate

IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox (test environment) for testing. In production, the new fields of this section are rejected until Dec 7, 2026. See the summary in Changes to the national standard NFS-e.

The imovel group is required when cod_indicador_operacao is 020101, 020201 or 020301 and the service is not a construction service. In all other cases, do not send the group.

The rps[].servico.imovel object accepts the formats shown below. The inscricao_imobiliaria (city property registration) can go with the CIB or with the address. When you send codigo_cib, it takes precedence over the address. To send an address, use imovel.endereco as a string or as a structured object. In the NotaControl/ISSNet provider, send the full address: the CIB alone or the property registration alone is not accepted. The examples are illustrative excerpts of the group, not complete issuing requests.

How to identify the property
Method Today (production) From Dec 7, 2026 (already in the sandbox)
Brazilian address with CEP (postal code), in direct fields or in the endereco object Accepted Accepted, no change
CIB with the city (codigo_municipio or CEP) Accepted Accepted, no change
CIB without the city and without CEP Accepted Not accepted: send codigo_municipio
Property registration only Accepted Not accepted: add the CIB or the address
Address outside Brazil Accepted Not accepted
Property fields (servico.imovel object)
Parameter NFS-e Type Size Description
endereco, numero, complemento, bairro, cep
string - Brazilian address of the property, in direct fields. endereco (street) up to 255 characters; numero and bairro (district) up to 60; complemento up to 156; cep with 8 digits, without a mask.
endereco (object)
object - An alternative to the direct fields: a structured address with logradouro, numero, complemento, bairro and the endereco_nacional group (cep and, optionally, codigo_municipio_ibge). See Example 2.
codigo_cib
string 8 Property identification code (CIB), with 8 alphanumeric characters, without a mask. From Dec 7, 2026, it must come with the city of the property (codigo_municipio or CEP).
codigo_municipio NEW
string 7 IBGE city code of the property. Required when there is no Brazilian CEP (for example, a property identified by the CIB) and whenever you use unidades[]. The API never uses the city of the service provider in its place.
inscricao_imobiliaria
string 1-30 City property registration. From Dec 7, 2026, it is additional information to the CIB or the address.
locacao NEW
object - Required for services 99.03.xx (lease, paid assignment, rental (arrendamento), easement and permission to use real estate). Not accepted for other services. See Lease.
ajustes[] NEW
array 0-1000 Only for services 99.03.xx: amounts included in the rent that are not part of the IBS and CBS tax base. See Adjustments.
unidades[] NEW
array 1-99 List of properties, to send more than one property on the same invoice. See Units.

Lease (imovel.locacao object) NEW

Parameter NFS-e Type Size Description
percentual_copropriedade
decimal 3v2 Co-ownership share of the issuer in the property, from 0 to 100, with up to two decimal places.
Ex.: "40.00"
100% is not assumed.
valor_total_operacao
decimal 15v2 Total amount of the transaction, not the issuer's share. The valor_servicos must be the co-ownership share applied to this total.
valor_desconto_incondicionado_total
decimal 15v2 Total unconditional discount of the transaction. Required when there is a desconto_incondicionado, which must be the share applied to this total.
valor_desconto_condicionado_total
decimal 15v2 Total conditional discount of the transaction. Required when there is a desconto_condicionado, which must be the share applied to this total.
data_vencimento_original
string 10 Original due date.
Format: YYYY-MM-DD

Send amounts with a dot as the decimal separator, preferably as a string, without a comma or an exponent. Example: 40% of "1000.00" gives a valor_servicos of "400.00".

Adjustments (items of imovel.ajustes[] or unidades[].ajustes[]) NEW

Parameter NFS-e Type Size Description
tipo
string 2 Type of amount included in the rent (or equivalent) that is not part of the IBS and CBS tax base.
01 - Taxes included in the rent (e.g. IPTU property tax, betterment levy)
02 - Registry fees included in the rent
03 - Condominium fees included in the rent
04 - Social reducer (redutor social)
99 - Other amounts included in the rent

Types 01, 02 and 03 apply to NBS codes 110021000 and 110022000. Type 04 requires codigo_nbs 110021000.
descricao
string 1-150 Description of the amount. Required only for type 99. Not accepted for the other types.
valor
decimal 15v2 Total amount of the item, not the proportional share. It cannot be greater than valor_total_operacao.

Units (items of imovel.unidades[]) NEW

Parameter NFS-e Type Size Description
codigo_cib or address
- - Each unit has the CIB or the Brazilian address (direct fields or the endereco object), never both.
inscricao_imobiliaria
string 1-30 Additional information of the unit.
ajustes[]
array 0-1000 Adjustments of the unit, only for services 99.03.xx. Same fields as Adjustments.

When you use unidades[], send imovel.codigo_municipio. Do not send an address, CIB, property registration or adjustments directly in imovel.

Example 1 — Brazilian address with CEP (excerpt of servico, unchanged):

{
  "cod_indicador_operacao": "020301",
  "valor_servicos": "150000.00",
  "discriminacao": "Intermediação na venda de imóvel residencial",
  "imovel": {
    "endereco": "Av. Paulista",
    "numero": "1000",
    "complemento": "Apto 101",
    "bairro": "Bela Vista",
    "cep": "01310100"
  }
}

Example 2 — Structured address (excerpt of servico, unchanged):

{
  "imovel": {
    "endereco": {
      "logradouro": "Av. Paulista",
      "numero": "1000",
      "bairro": "Bela Vista",
      "endereco_nacional": {
        "codigo_municipio_ibge": "3550308",
        "cep": "01310100"
      }
    }
  }
}

Example 3 — CIB with the city (excerpt of servico):

{
  "imovel": {
    "codigo_cib": "AB12CD34",
    "codigo_municipio": "3550308",
    "inscricao_imobiliaria": "001234"
  }
}

Example 4 — Real estate lease (service 99.03.01, excerpt of servico):

{
  "codigo_servico": "990301",
  "codigo_nbs": "110021000",
  "cod_indicador_operacao": "020201",
  "valor_servicos": "400.00",
  "imovel": {
    "endereco": "Rua Otávio Francisco Dias",
    "numero": "100",
    "bairro": "Água Verde",
    "cep": "80620310",
    "locacao": {
      "percentual_copropriedade": "40.00",
      "valor_total_operacao": "1000.00"
    },
    "ajustes": [
      { "tipo": "03", "valor": "150.00" }
    ]
  }
}

Example 5 — More than one property on the same invoice (excerpt of servico):

{
  "imovel": {
    "codigo_municipio": "4106902",
    "unidades": [
      {
        "endereco": "Rua XV de Novembro",
        "numero": "100",
        "bairro": "Centro",
        "cep": "80020310"
      },
      {
        "codigo_cib": "AB12CD34",
        "inscricao_imobiliaria": "001234"
      }
    ]
  }
}

For more details on the service fields, see the Tax reform — New fields section.

Issuing an invoice > RPS > Service
Movable goods

IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox for testing. In production, the new fields of this section are rejected until Dec 7, 2026. See the summary in Changes to the national standard NFS-e.

For the lease of movable goods (service 99.04.01), send the servico.bens_moveis[] list together with servico.impostos.ibs_cbs. The list is required for this service and is not accepted for other services. Send from 1 to 1,000 goods. The fields below belong to each item:

Parameter NFS-e Type Size Description
codigo_ncm
string 8 NCM of the item, the Mercosur product classification code, with exactly 8 digits. Keep the leading zeros.
descricao
string 1-150 Description of the movable good.
quantidade
integer 1-999 Quantity, as a JSON integer (not a string or a decimal).

Example — excerpt of servico: keep the other required issuing data and use the cClassTrib (tax classification) that applies to the transaction.

{
  "codigo_servico": "990401",
  "valor_servicos": "100.00",
  "impostos": {
    "ibs_cbs": {
      "situacao_tributaria": "000",
      "classificacao_tributaria": "000001"
    }
  },
  "bens_moveis": [
    {
      "codigo_ncm": "84713012",
      "descricao": "Computador portátil",
      "quantidade": 2
    }
  ]
}

Issuing an invoice > RPS > Service
Tax base adjustment

IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox for testing. In production, the new fields of this section are rejected until Dec 7, 2026. See the summary in Changes to the national standard NFS-e.

In the national standard provider, ISSQN (ISS) deductions/reductions and reimbursements/pass-throughs move into one group, servico.ajuste_base_calculo. The deducao_reducao and reembolso_repasse groups are still accepted. They are converted automatically when there is a direct match (see the mapping table below). Do not send ajuste_base_calculo together with deducao_reducao or reembolso_repasse.

Send percentual_iss, valor_iss or documentos.

Tax base adjustment (servico.ajuste_base_calculo object)
Parameter NFS-e Type Size Description
percentual_iss
string 1-3v2 Adjustment percentage of the ISSQN tax base, from 0 to 100. Do not send it together with valor_iss.
valor_iss
string 15v2 Adjustment amount of the ISSQN tax base. It cannot be greater than valor_servicos. Do not send it together with percentual_iss.
documentos
array 1-1000 Documents that support each adjustment. See the table below.
Documents (items of ajuste_base_calculo.documentos[])
Parameter NFS-e Type Size Description
tipo
string 1-3 Type of adjustment.
2 - Materials
5 - Consortium pass-through
6 - Health plan pass-through
7 - Services
8 - Labor subcontracting
9 - Partner professional
99 - Other deductions exclusive to ISSQN
101 - Pass-through of real estate brokerage fees to other brokers involved in the transaction
102 - Pass-through to a supplier for a supply brokered by a travel agency
103 - Reimbursement received by an advertising agency for external production services paid on behalf of a third party
104 - Reimbursement received by an advertising agency for media services paid on behalf of a third party
105 - Disallowance (glosa) of health services
199 - Other reimbursements received for amounts paid in transactions on behalf of a third party
descricao
string 1-150 Description of the adjustment. Required only for types 99 and 199. Not accepted for the other types.
valor_total
string 15v2 Total amount of the document.
valor_aplicado
string 15v2 Adjustment amount applied. It cannot be greater than valor_total. The sum of the documents cannot be greater than valor_servicos.
data_emissao
string 10 Issue date of the document.
Format: YYYY-MM-DD
data_competencia
string 10 Accrual date (competência) of the document.
Format: YYYY-MM-DD
dfe_nacional
object - Electronic tax document of the national environment (tipo_chave_dfe, chave_dfe and, for type 9, descricao_tipo_chave_dfe).
dfe_outro
object - Tax document outside the national environment (codigo_municipio_emissor, numero_documento, descricao_documento). Accepted only for an accrual period before Jan 1, 2026.
doc_outro
object - Non-tax document (numero_documento, descricao_documento). Not accepted for types 101, 103, 104 and 199, which require a tax document.
fornecedor
object - Supplier of the document, with the same fields as Referenced supplier.

Send exactly one of dfe_nacional, dfe_outro and doc_outro in each document. Together with percentual_iss or valor_iss, the documents accept only types 101 to 105 and 199. For services 06.01 and 06.02, send only type 9 or 199.

Mapping from deduction/reduction and reimbursement/pass-through
Today From Dec 7, 2026
deducao_reducao.percentual / valor percentual_iss / valor_iss
tipo_deducao_reducao 2, 5, 6, 7, 8, 9 and 99 Same code in tipo
tipo_deducao_reducao 3 (external production) tipo 103
tipo_deducao_reducao 1 (food and drinks/minibar) Not accepted: discontinued type
tipo_deducao_reducao 4 (expense reimbursement) Not accepted: send the matching tipo in ajuste_base_calculo
tipo_reembolso 01, 02, 03, 04 and 99 tipo 101, 102, 103, 104 and 199
valor_deducao (deduction) / valor (reimbursement) valor_aplicado
chave_nfse / chave_nfe dfe_nacional
nfse_municipal, nf_nfs, doc_fiscal or doc_nao_fiscal Not converted: send dfe_outro or doc_outro in ajuste_base_calculo
valor_dedutivel Not converted: send valor_total
data_competencia (missing in deduction/reduction) Required in each document

Example — excerpt of servico:

{
  "valor_servicos": "1000.00",
  "ajuste_base_calculo": {
    "documentos": [
      {
        "tipo": "2",
        "valor_total": "300.00",
        "valor_aplicado": "300.00",
        "data_emissao": "2026-11-20",
        "data_competencia": "2026-11-20",
        "dfe_nacional": {
          "tipo_chave_dfe": 2,
          "chave_dfe": "41261112345678000195550010000012341000012345"
        }
      }
    ]
  }
}

Issuing an invoice > RPS > Service
Reimbursement/Pass-through

IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox: reimbursements/pass-throughs move to Tax base adjustment (types 101 to 104 and 199). The reembolso_repasse group is still accepted and is converted automatically. Also send valor_total in each document. dfe_outro documents are then accepted only for an accrual period before Jan 1, 2026, and doc_outro is no longer accepted for types 01, 03, 04 and 99.

Send the rps[].servico.reembolso_repasse object for a reimbursement, pass-through or refund that is taken into account in the tax base of ISSQN, IBS and CBS. The table below lists the parameters of this object:

Parameter NFS-e Type Size Description
documentos
array 1-1000 List of documents that support the reimbursement, pass-through or refund.

Issuing an invoice > RPS > Service > Reimbursement/Pass-through
Documents

This section shows the types of documents you can reference to support the reimbursement/pass-through.

Each item of rps[].servico.reembolso_repasse.documentos[] is an object with the fields below. Fill in exactly one of the dfe_nacional, dfe_outro or doc_outro groups per item.

Parameter NFS-e Type Size Description
tipo_reembolso
number 2 Code of the reimbursement/pass-through type. 01 - Pass-through of real estate brokerage fees to other brokers involved in the transaction;
02 - Pass-through to a supplier for a supply brokered by a travel agency;
03 - Reimbursement received by an advertising agency for external production services paid on behalf of a third party;
04 - Reimbursement received by an advertising agency for amounts paid
for media services on behalf of a third party;
99 - Other reimbursements received for amounts paid in transactions on behalf of a third party;
descricao
string 1-150 Description of the reimbursement/pass-through type. Required when tipo_reembolso = 99.
valor
string 15v2 Total amount reimbursed or passed through.
fornecedor_referenciado
object - Supplier of the referenced document. If you send it, fill in one ID and the name, as shown in the table below.
dfe_nacional
object - Electronic tax document
The document must be available in the national data environment.
dfe_outro
object - Non-electronic tax document.
doc_outro
object - Other document.
data_emissao
string 10 Issue date of the referenced document.YYYY-MM-DD
data_competencia
string 10 Accrual date (competência) of the referenced document.YYYY-MM-DD
Referenced supplier
Parameter NFS-e Type Size Description
cpf
Individual
string 11 CPF of the supplier.
000.000.000-00
cnpj
Company
string 14 CNPJ of the supplier.
00.000.000/0000-00
id_estrangeiro
Foreign person
string 1-40 ID of the foreign supplier.
Passport number or another legal document that identifies a foreign person.
nome
string 1-150 Name or legal name of the supplier.
indicador_nao_nif
number 1 Reason why the NIF (foreign tax ID) is not sent.
0 - Not stated on the source invoice;
1 - Exempt from NIF;
2 - NIF not required;
National DF-e
Parameter NFS-e Type Size Description
tipo_chave_dfe
number 1 Type of national electronic tax document (DF-e).
1 - NFS-e
2 - NF-e
3 - CT-e
9 - Other
descricao_tipo_chave_dfe
string 1-255 Description of the tax document type.Required when tipo_chave_dfe = 9 (Other)
chave_dfe
string 1-50 Access key of the tax document (NFS-e, NF-e, CT-e, etc.).
Other DF-e
Parameter NFS-e Type Size Description
codigo_municipio_emissor
string 7 IBGE code of the city that issued the tax document.
numero_documento
string 1-255 Number of the tax document.
descricao_documento
string 1-255 Description of the tax document.
Other document
Parameter NFS-e Type Size Description
numero_documento
string 1-255 Number of the document.
descricao_documento
string 1-255 Description of the document.

Issuing an invoice > RPS > Service > Deduction/Reduction
Deduction/Reduction

A deduction or reduction on the NFS-e (service invoice) applies only to cities that use the national standard (Padrão Nacional). It subtracts amounts from the tax base of the ISSQN (ISS, the city service tax). This lowers the final tax the service provider (prestador) pays.

IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox (test environment): deductions and reductions move to Tax base adjustment. The API still accepts the deducao_reducao group and converts it automatically. The exceptions are types 1 and 4 and the documents nfse_municipal, nf_nfs, doc_fiscal and doc_nao_fiscal. With documentos, also send valor_total and data_competencia in each document.

Important rules:
  • Tax base: when you send deducao_reducao, the API calculates the deducoes amount automatically.
  • Limits: the sum of valor_deducao (when you use documentos) cannot be greater than valor_servicos.
Parameter NFS-e Type Size Description
deducao_reducao
object --- Object that holds the type of deduction/reduction.

Issuing an invoice > RPS > Service > Deduction/Reduction
Deduction/reduction types

To send a deduction or reduction on the NFS-e, send only one of the options below, as you need:

Parameter NFS-e Type Size Description
valor
string 15v2 Amount of the deduction/reduction
Use this option when the deduction is an amount. It must be greater than or equal to zero and less than or equal to valor_servicos.
percentual
string 1-3v2 Deduction/reduction percentage (0 to 100)
Use this option when the deduction is a percentage.
documentos
array 1-1000 List of documents that support the deduction/reduction

Issuing an invoice > RPS > Service > Deduction/Reduction
Deduction/reduction documents

Deduction/reduction documents (deducao_reducao.documentos[]): each item must have only one document identifier, plus the required fields below.

Parameter NFS-e Type Size Description
chave_nfse
string 50 Access key of the NFS-e (national standard)
chave_nfe
string 44 Access key of the NF-e (electronic invoice for goods)
nfse_municipal
object --- Data of a city NFS-e outside the national standard
nf_nfs
object --- Data of a non-electronic NF/NFS (paper invoice)
fornecedor
object --- Data of the supplier of the service provided
doc_fiscal
string 255 Identifier of a tax document (when none of the options above fits)
doc_nao_fiscal
string 255 Identifier of a non-tax document (when it applies)
tipo_deducao_reducao
number 2 Deduction/reduction scenario
1 - Food and beverages/minibar
2 - Materials
3 - External production
4 - Expense reimbursement
5 - Consortium pass-through
6 - Health plan pass-through
7 - Services
8 - Labor subcontracting
99 - Other deductions
The options depend on the layout the city uses. Codes 3 and 4 are not accepted in national layout 1.01 or later.
descricao_outras_deducoes
string 150 Description of other deductions.Required when tipo_deducao_reducao = 99
data_emissao
date --- Issue date of the document
Accepts: YYYY-MM-DD or DD/MM/YYYY
valor_dedutivel
string 15v2 Total deductible amount of the document
valor_deducao
string 15v2 Amount used in the deduction/reduction of the service
Must be ≤ valor_dedutivel

Issuing an invoice > RPS > Service > Deduction/Reduction
City invoice

To send the data of a city NFS-e outside the national standard, fill in the fields below:

Parameter NFS-e Type Size Description
codigo_municipio
string 7 City code (IBGE city code)
numero
string 1-15 Number of the city NFS-e, digits only
codigo_verificacao
string 1-9 Verification code of the city NFS-e

Issuing an invoice > RPS > Service > Deduction/Reduction
Non-electronic NF/NFS

To send the data of a non-electronic NF or NFS (paper invoice), fill in the fields below:

Parameter NFS-e Type Size Description
numero
string 7 Number of the NF/NFS
modelo
string 1-15 Model of the NF/NFS, digits only
serie
string 1-9 Series of the NF/NFS

Issuing an invoice > RPS > Service > Deduction/Reduction
Supplier

To send the data of the supplier of the service provided, fill in the fields below:

Supplier (deducao_reducao.documentos[].fornecedor): when you send this object, fill in the CPF (individual taxpayer ID), CNPJ (company ID), foreign ID or motivo_sem_nif, with the matching name. If you send address data, also fill in the street, number and neighborhood. For a Brazilian supplier, send the CEP (postal code) and the city code. For a foreign supplier, send the country code, foreign postal code, city and state/province.

Parameter NFS-e Type Size Description
cpf
string 11 CPF of the supplier
nome_completo is required
cnpj
string 14 CNPJ of the supplier
razao_social is required
id_estrangeiro
string 40 ID of the supplier abroad
nome_estrangeiro is required
motivo_sem_nif
number 1 Reason for not sending a foreign ID (NIF, the foreign tax ID)
0 - Not stated on the source invoice
1 - Waived
2 - Not required
nome_estrangeiro is required when you use this option.
razao_social
string 1-150 Legal company name (required when you use a CNPJ)
nome_completo
string 1-150 Full name (required when you use a CPF)
nome_estrangeiro
string 1-150 Name of the supplier abroad
Required when you send id_estrangeiro or motivo_sem_nif.
caepf
string 14 CAEPF of the supplier, the registration of an individual employer (optional)
im
string 15 Inscrição Municipal (IM, city registration) of the supplier (optional)
endereco
string 255 Street of the supplier
If you send any address field, this one becomes required.
numero
string 1-60 Street number
Required when you send an address.
complemento
string 156 Address line 2
bairro
string 60 Neighborhood
cep
string 8 CEP (when the supplier is Brazilian)
codigo_municipio
string 7 IBGE city code of a Brazilian supplier
codigo_pais
string 4 Country code (when the supplier is abroad)
cep_exterior
string 11 Postal code abroad
cidade
string 60 City abroad
estado
string 60 State/province abroad
telefone
string 20 Phone number of the supplier
email
string 80 Email of the supplier

Issuing an invoice > RPS
Service buyer

The service buyer (tomador) is the party that pays for the service. Send the service buyer data in the tomador object of each RPS, as shown in the RPS information table.

Parameter NFS-e Type Size Description
cpf
Individual
string 11 CPF number (individual taxpayer ID)
000.000.000-00
nome_completo
Individual
string 2-150 Full name
cnpj
Company
string 14 CNPJ (company ID)
00.000.000/0000-00
razao_social
Company
string 2-150 Legal company name
im
string 1-15 City registration (inscrição municipal)
nif
string 1-40 NIF (foreign tax ID)
endereco
string 1-125 on input *Required for a company
Street address of the service buyer
The city may apply a lower limit.
numero
string 1-10 on input *Required for a company
Street number of the service buyer address
Send it as a string. The city may apply a lower limit.
complemento
string 1-60 on input Address details of the service buyer (suite, floor)
The city may apply a lower limit.
bairro
string 1-60 on input *Required for a company
Neighborhood of the service buyer address
The city may apply a lower limit.
cidade
string 1-60 on input *Required for a company
City of the service buyer address
The city may apply a lower limit.
uf
string 2 *Required for a company
Two-letter state code (UF) of the service buyer address
cep
string 8 digits *Required for a company
CEP (postal code) of the service buyer address
Accepts 00000000 or 00000-000; the hyphen is removed during processing.
email
string Depends on the city Email of the service buyer, used to send the NFS-e
String on input. In the Abrasf 2.04 and national standard layouts, the limit is 80 characters.
telefone
string Min. 8 characters on input Phone number of the service buyer
Send the area code (DDD) and the number. Non-numeric characters are removed during processing. The maximum length depends on the city (20 digits in the Abrasf 2.04 and national standard layouts).

Issuing an invoice > RPS > Service buyer
Foreign

When the service buyer lives outside Brazil, send the data of the foreign service buyer. Send these fields in the tomador object, as shown in the RPS information table.
Note: This table describes the foreign service buyer in the Abrasf 2.04 model. Support and limits vary with the city layout. In Simpliss Abrasf 2.03, the full address is limited to 125 characters. Do not send cpf or cnpj together with id_estrangeiro.

Parameter NFS-e Type Size Description
nome_estrangeiro
string 1-150 Full name
id_estrangeiro
string 1-40 ID number (passport or another legal document)
endereco_completo
string 1-255 Full address
nome_pais
string 1-40 Country name
codigo_pais
string 4 Country code (Brazilian Central Bank, BACEN, standard)
Example: United States = 2496
See the BACEN table (in Portuguese)
email
string 1-80 Email of the service buyer, used to send the NFS-e in the Abrasf 2.04 layout

Issuing an invoice > RPS
Recipient

Notice - Tax reform:

The parameters in this section belong to the tax reform. No environment of the National Portal can receive these new parameters yet. If you choose to send them, they are only validated and do not appear in the XML of the invoice.

To learn when these fields become available, see the "Tax reform" section.

Recipient vs. service buyer:

The recipient (destinatário) is the party that receives the service. The service buyer (tomador) is the party that pays for it.

In most cases, the recipient and the service buyer are the same. In that case, you do not need to send the parameter destinatario.

Example: For a technical repair service, the head office can hire and pay for the service (service buyer), while the service is provided at a branch (recipient).

Send the destinatario group when servico.indicador_destinatario=1. The tables below describe the nested structure that the national standard (Padrão Nacional) uses. Send one ID: cpf, cnpj or id_estrangeiro. The nome field and the endereco object are required when you send a recipient. Inside endereco, send logradouro, numero, bairro and exactly one of the subgroups endereco_nacional or endereco_exterior, with every field of its table. Other city layouts may use their own structure and limits.

Parameter NFS-e Type Size Description
cpf
Individual
string 11 CPF number (individual taxpayer ID)
000.000.000-00
nome
string 1-150 Full name or legal company name of the recipient.
cnpj
Company
string 14 CNPJ (company ID)
00.000.000/0000-00
id_estrangeiro
Foreign person
string 1-40 ID of the foreign recipient.
Passport number or another legal document that identifies a foreign person.
nif
string 1-40 NIF (foreign tax ID) of the foreign recipient.
indicador_nao_nif
number 1 Reason why the NIF is not sent.
0 - Not stated on the source invoice;
1 - Exempt from NIF;
2 - NIF not required;
endereco
object - Address of the recipient, as a nested object. See the tables below.
email
string 1-80 Email of the recipient, used to send the NFS-e
telefone
string 6-20 digits Phone number of the recipient
Non-numeric characters are removed during processing.
Recipient address
Parameter NFS-e Type Size Description
logradouro
string 1-255 Street of the recipient address.
numero
string 1-60 Street number of the recipient address.
complemento
string Up to 156 Address details of the recipient (suite, floor).
bairro
string 1-60 Neighborhood of the recipient address.
endereco_nacional
object - Group for a Brazilian address of the recipient.
endereco_exterior
object - Group for a foreign address of the recipient.
Brazilian address
Parameter NFS-e Type Size Description
codigo_municipio_ibge
string 7 IBGE city code. 7 digits.Example: São Paulo = 3550308
cep
string 8 CEP (postal code) of the address. 8 digits, no mask.Example: 01310100
Foreign address
Parameter NFS-e Type Size Description
codigo_pais
string 2 Country code in the national standard: two-letter ISO code, in uppercase.Example: United States = US. Do not use the four-digit BACEN code in this subgroup.
codigo_postal
string 1-11 Postal code of the foreign address.
cidade
string 1-60 City of the foreign address.
estado_provincia
string 1-60 State or province of the foreign address.

Issuing an invoice > RPS
Construction

Send the construction data when the service is related to a construction project. Send these fields in the construcao_civil object, as shown in the RPS information table. The parameters vary with the standard of the provider (the system the city hall uses to authorize NFS-e). The tables below list the parameters for the Abrasf, Padrão Nacional (national standard), Sigissweb and São Paulo (RTC) models.

Abrasf model
Parameter NFS-e Type Size Description
codigo_obra
string 1-15 Construction project code. Optional in the Abrasf 2.01 and 2.04 layouts
art
string 1-15 Code of the ART (technical responsibility record, Anotação de Responsabilidade Técnica)

For the national standard, send inscricao_imobiliaria_fiscal, codigo_obra or the full address of the project (endereco, numero, bairro and cep). In the national standard layout, the XML uses the property tax registration first, then the project code, and the address last. Send the option you want to use. In the NotaControl (ISSNet) city layout, the full address is required even with a property tax registration. The codigo_obra field is not included in the XML of that layout.

National standard
Parameter NFS-e Type Size Description
inscricao_imobiliaria_fiscal
string 1-30 Property tax registration (inscrição imobiliária fiscal)
Code the city hall gives to identify the project or to collect IPTU (city property tax)
codigo_obra
string 1-30 ID number of the construction project
CNO (national construction registry, Cadastro Nacional de Obras) or CEI (specific INSS registration, Cadastro Específico do INSS)
endereco
string 1-255 Street of the project address
numero
string 1-60 Street number of the project address
complemento
string 1-156 Address details of the project (suite, floor)
bairro
string 1-60 Neighborhood of the project address
cep
string 8 CEP (postal code) of the project address

For Sigissweb, these parameters are required: cno, nome, cep, numero.

Sigissweb
Parameter NFS-e Type Size Description
cno
string1-12CNO (national construction registry)
nome
string1-60Name of the project
endereco
string1-125Address of the project
cep
string8CEP (postal code) of the project
numero
string1-10Street number of the project address
bairro
string1-60Neighborhood of the project
cidade
string1-60City of the project
uf
string2State (UF) of the project
complemento
string1-60Address details of the project
inscricao_imobiliaria
string1-30Property tax registration of the project
exterior
string1Whether the project is outside Brazil
1 - Yes
0 - No
São Paulo (RTC)
Parameter NFS-e Type Size Description
codigo_obra
string 1-12 Project code (CEI/CNO)
matricula_obra
string 1-12 Project registration number (matrícula da obra)
numero_encapsulamento
string 1-12 Encapsulation number (número de encapsulamento)
uf_local_obra
string 2 State (UF) where the project is located
Required when cidade_local_obra is sent.
cidade_local_obra
string 1-40 City where the project is located
Required when uf_local_obra is sent.

Issuing an invoice > RPS
Event activities

Event activities are services provided at artistic, cultural, sports and similar events. In the national standard, event activity data is required for the services of item 12 of the service list (code 12.XX.XX). From Dec 7, 2026, it is also required for subitem 17.10. With other providers, the requirement depends on the layout. Send these fields in the atividades_evento object in the national standard and in SigissWeb. In São Paulo (RTC), use the atividade_evento object (singular). The parameters and when they are required vary with the provider. In the national standard, send identificacao or the full address of the event (endereco, numero, bairro and cep). If you send both, the XML uses the ID.

IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox (test environment): subitem 17.10 now requires atividades_evento. In subitems 12.13 and 17.10, you can send the city of the event in atividades_evento.codigo_municipio. See the summary in Changes to the national standard NFS-e.

National standard
Parameter NFS-e Type Size Description
descricao_evento
string 1-255 Name and description of the artistic, cultural, sports or other event.
data_inicio
string 10 Start date of the event activity
Format: YYYY-MM-DD
data_final
string 10 End date of the event activity
Format: YYYY-MM-DD
identificacao
string 1-30 ID of the event activity.
Required if you do not send the address where the event activity takes place.
Event ID code set by the city tax administration
endereco
string 1-255 Street of the event activity address
numero
string 1-60 Street number of the event activity address
complemento
string 1-156 Address details of the event activity location (suite, floor)
bairro
string 1-60 Neighborhood of the event activity address
cep
string 8 CEP (postal code) of the event activity address
codigo_municipio
string 7 IBGE code of the city where the event takes place. Accepted only for subitems 12.13 and 17.10. It must differ from the city where the service is provided. Available in the sandbox; in production from Dec 7, 2026.

In SigissWeb, descricao_evento, data_inicio and data_final are required when you send atividades_evento. The other fields of the table above are optional with this provider. It does not require the ID or the full address, as the national standard does. These parameters are also available:

Sigissweb
Parameter NFS-e Type Size Description
cidade
string1-60City of the event activity location
uf
string2State (UF) of the event activity city
uf_prestacao
string2State (UF) where the event service is provided
pais
string1-60Country of the event activity location
exterior
string1Whether the event is outside Brazil
1 - Yes
0 - No
São Paulo (RTC)
Parameter NFS-e Type Size Description
descricao_evento
string 1-255 Name and description of the event
data_inicio
string 10 Start date of the event
Format: YYYY-MM-DD
data_final
string 10 End date of the event
Format: YYYY-MM-DD
endereco
string 1-50 Street of the event location
numero
string 1-10 Street number of the event address
complemento
string 1-30 Address details of the event (suite, floor)
bairro
string 1-30 Neighborhood of the event location
cep
string 7-8 CEP (postal code) of the event location
If you do not send it, use codigo_pais + cep_exterior + cidade + estado.
codigo_pais
string 4 Country code (Brazilian Central Bank, BACEN)
Required when cep is not sent.
cep_exterior
string 1-11 Postal code of the foreign address
Required when cep is not sent.
cidade
string 1-60 City of the foreign address
Required when cep is not sent.
estado
string 1-60 State or province of the foreign address
Required when cep is not sent.

Issuing an invoice
Providers

A provider (provedor) is the system a city hall uses to authorize service invoices (NFS-e). Each provider may ask for extra fields in the servico object, on top of the fields in RPS information. Find your city's provider in the modelo field of City status. Then check below which fields each provider accepts or requires.

For the Prescon and Pública providers, open the status and check the ambientes, autenticacao, emissao and funcoes fields:

  • Prescon (Ubatuba, Vargem and Vinhedo, in the state of São Paulo; Campos do Jordão already issues through the national standard (Padrão Nacional)): it does not use a digital certificate. Authentication is login_senha, with the city registration (Inscrição Municipal) and the city hall password. In Vinhedo, it is token, provided by the city hall. Only the production environment exists, and each request sends a single RPS. In Ubatuba, cancellation is not available.
  • Pública (cities in the states of Santa Catarina and Rio Grande do Norte, such as Joinville): authentication is certificado_a1, and emissao includes lote_rps, which allows batch sending. The sandbox (test environment) is available only in Joinville. There, natureza_operacao accepts values from 1 to 7. The API converts them to the city's code based on the company's tax regime, the ISS withholding, the city where the service is provided and a foreign service buyer.

Issuing an invoice > Providers
Abrasf provider

The Abrasf XML model is the one most cities use to issue service invoices. It is available in versions 1.00, 2.00, 2.01, 2.02, 2.03 and 2.04. The table below lists the specific fields of each version of this model:

Parameter Required Version Type Size Description
codigo_servico
All versions string Varies by city Service code required by the city. The format varies by version and provider.
Example: 00.00. In layout 2.04, some cities require the 6-digit national code.
codigo_cnae
All versions string 7 CNAE code (economic activity code)
codigo_tributacao_municipio
All versions string 1-20 City tax code
uf_local_prestacao
All versions string 2 State (UF) where the service is provided
cidade_local_prestacao
All versions string 1-20 City where the service is provided
natureza_operacao
1.00 number 1 Natureza da operação (nature of the transaction) code
1 - Taxed in the city
2 - Taxed outside the city
3 - Exemption
4 - Immune
5 - Liability suspended by a court decision
6 - Liability suspended by an administrative proceeding
exigibilidade_iss
2.00 or later number 1 ISS liability (exigibilidade); ISS is the city tax on services
1 - Payable
2 - Not levied
3 - Exemption
4 - Export
5 - Immunity
6 - Liability suspended by a court decision
7 - Liability suspended by an administrative proceeding
data_competencia
2.00 or later string 10 Accrual date (data de competência)
Format: YYYY-MM-DD
numero_processo
2.00 or later string 1-30 Number of the court or administrative proceeding that suspends the ISS liability
local_incidencia
2.00 or later number 1 Place of taxation
1 - City of the service provider
2 - City where the service is provided
3 - City of the service buyer
codigo_nbs
2.03 and 2.04 string 1-9 NBS code (Brazilian Nomenclature of Services)
informacoes_complementares
2.04 string 1-2000 Additional information about the service provided.
itens
2.04 array --- Service items available only for Uberlândia, MG

Issuing an invoice > Providers > Abrasf
Items

Send the item information in the itens object, as shown in the Abrasf provider table.

Parameter NFS-e Type Size Description
descricao
string 1-255 Item description
quantidade
string Up to 15 characters Item quantity. The limit includes the decimal separator and the 2 decimal places after normalization.
00.00
valor_unitario
string Up to 15 characters Item unit price. The limit includes the decimal separator and the 2 or 4 decimal places after normalization, depending on the city.
00.00
item_tributavel
string 1 Whether the item is taxable
1 - Yes
2 - No

Issuing an invoice > Providers
Cecam provider

Specific issuing fields in the cities served by the Cecam provider, on top of the fields in RPS information:

Parameter Required Type Size Description
codigo_cnae
string 7 CNAE code
codigo_servico
string 3-5 Service code
0000
local_prestacao
string 1 Place where the service is provided
1 - Service provider's head office
2 - Real estate (construction)
3 - Public road
4 - Outside the city
cep_local_prestacao
string 8 digits CEP (postal code) of the place where the service is provided. When sent, it must have 8 digits after the formatting is removed.
Optional in the API validation. Check what the city requires for services provided outside it.

Issuing an invoice > Providers
Conam provider

Specific issuing fields in the cities served by the Conam provider, on top of the fields in RPS information:

Parameter Required Type Size Description
operacao_onerosa
number 1 Whether the transaction is paid (onerosa)
1 - YES
2 - NO
Default: YES (1) when not sent.

When the service is not paid, send 2 (NO) explicitly. Sending the wrong value, or leaving out the field for a truly free service, can cause a tax problem with the city.
codigo_tributacao_municipio
string 1-9 City tax code
1 to 9 digits.
codigo_nbs
string 9 NBS code (Brazilian Nomenclature of Services)
Exactly 9 digits.
uf_local_prestacao
string 2 State (UF) where the service is provided
Required when impostos.ibs_cbs is sent and the service buyer/recipient has no state/city.
cidade_local_prestacao
string 1-20 City where the service is provided
Required when impostos.ibs_cbs is sent and the service buyer/recipient has no state/city.

Issuing an invoice > Providers
DSF provider

Specific issuing fields in the cities served by the DSF provider, on top of the fields in RPS information:

Parameter Required Type Size Description
codigo_cnae
string 7 or 9 CNAE code: 9 digits for Campinas (SP) and 7 for the other cities served by this layout.
tipo_operacao
string 1 Transaction type
A - No deduction
B - With deduction/materials
C - Immune/exempt from ISS
D - Return/simple shipment
J - Intermediation
tipo_tributacao
string 1 Taxation type
C - Exempt from ISS
E - Not levied in the city
F - Immune
K - Liability suspended by a court decision or an administrative proceeding
N - Not taxable
T - Taxable
G - Taxable, fixed amount
H - Taxable, Simples Nacional
M - Individual micro-entrepreneur (MEI)

Issuing an invoice > Providers
Equiplano provider

Specific issuing fields in the Equiplano provider, on top of the fields in RPS information:

Parameter Required Type Size Parent parameter Description
codigo_servico
string 4-6 servico Service code
"00.00"
justificativa_deducoes
string 1-255 servico Reason for the deduction amount. Required when the document has a deduction amount.
descricao_impostos
string 1-500 impostos Description of the tax amounts applied to the document.
ie
string 1-20 tomador IE (Inscrição Estadual, state registration) of the service buyer (tomador).
Foreign service buyer
Parameter Required Type Size Parent parameter Description
pais
string 1-500 tomador Name of the country where the foreign buyer lives.

Issuing an invoice > Providers
Florianópolis provider

Specific issuing fields in the city of Florianópolis, on top of the fields in RPS information:

Parameter Required Type Size Description
cfps
string 4 Service tax code (CFPS, Código Fiscal de Prestação de Serviços)
id_cnae
string 3 or more ID code of the service provided

Note: the CNAE ID is not the same as the CNAE code. Check the table published by the city to find the CNAE ID that matches the service provided.
situacao_tributaria
string 1-2 CST (Código de Situação Tributária, tax status code)
0 - Fully taxed
1 - Fully taxed, under the Simples Nacional regime
2 - Fully taxed, with ISS withheld at source
3 - Fully taxed, under the Simples Nacional regime, with ISS withheld at source
4 - Fully taxed, under the tax substitution regime
5 - Fully taxed, under the tax substitution regime by the agent or intermediary of the service
6 - Fully taxed, under the Simples Nacional and tax substitution regimes
7 - Fully taxed, with ISS previously withheld by the tax substitute
8 - Taxed with a reduced tax base or rate
9 - Taxed with a reduced tax base or rate, with ISS withheld at source
10 - Taxed with a reduced tax base or rate, under the tax substitution regime
11 - Taxed with a reduced tax base or rate, with ISS previously withheld by the tax substitute
12 - Exempt or immune
13 - Not taxed
14 - Taxed through the fixed tax
15 - Not taxed due to the destination of the goods or objects - Goods for manufacturing or resale
16 - Not taxed due to the deferral of the service

Issuing an invoice > Providers
Governa provider

Specific issuing fields in the cities served by the Governa provider, on top of the fields in RPS information:

Parameter Required Type Size Description
codigo_cnae
string 7-9 Service code
0000000
regime_recolhimento
string 2 Tax payment regime code
00 - Regular activity (movimento)
03 - Exempt
04 - Immune
07 - Not levied
08 - Estimate
09 - Professional partnership (Soc. Liberal)
11 - Simples Nacional
12 - Individual micro-entrepreneur (MEI)
forma_recolhimento
string 2 Tax payment method code
00 - Normal
01 - Withheld at source
02 - Paid in advance
03 - Simples Nacional
04 - Fixed/Annual
05 - No payment
06 - Owed to another city
07 - Fixed/Monthly

Issuing an invoice > Providers
IPM provider

Specific issuing fields in the cities served by the IPM provider, on top of the fields in RPS information:

Tip: In cities served by the IPM provider, you usually send the ISS rate in impostos.iss (city taxation).
Parameter Required Type Size Description
codigo_servico
string 5 Service code
00.00
situacao_tributaria
string 1-2 CST (Código de Situação Tributária, tax status code). When it is left out, the API uses 0.
0 - Fully taxed
1 - Fully taxed, with ISS withheld at source
2 - Fully taxed, under tax substitution
3 - Taxed with a reduced tax base
4 - Taxed with a reduced tax base, with ISS withheld at source
5 - Taxed with a reduced tax base, under tax substitution
6 - Exempt
7 - Immune
8 - Not taxed - ISS fixed regime
9 - Not taxed - ISS estimate regime
10 - Not taxed - construction ISS paid in advance
11 - Not taxed - ISS paid through a standalone invoice (Nota Avulsa)
12 - Not taxed - service provider established in the city
13 - Not taxed - payment made by a service provider from outside the city
14 - Not taxed
15 - Not taxed - cooperative act
99 - Products - combined tax document
natureza_operacao
string 1 Natureza da operação (nature of the transaction) code
1 - Taxed in the service provider's city
2 - Not taxed in the service provider's city

Issuing an invoice > Providers
Fortaleza provider

Specific issuing fields in the city of Fortaleza, CE, on top of the fields in RPS information:

Parameter Required Type Size Description
pis_cofins_retido
number 1 Withholding of PIS/COFINS (federal revenue taxes)
0 - PIS/COFINS/CSLL not withheld
1 - PIS/COFINS withheld (transition)
2 - PIS/COFINS not withheld (transition)
3 - PIS/COFINS/CSLL withheld
4 - PIS/COFINS withheld, CSLL not withheld
5 - PIS withheld, COFINS/CSLL not withheld
6 - COFINS withheld, PIS/CSLL not withheld
7 - PIS not withheld, COFINS/CSLL withheld
8 - PIS/COFINS not withheld, CSLL withheld
9 - COFINS not withheld, PIS/CSLL withheld
impostos.cst_pis_cofins
string 2 Tax status code (CST) of PIS/COFINS
00 - None
01 - Taxable transaction at the basic rate
02 - Taxable transaction at a differentiated rate
03 - Taxable transaction at a rate per unit of measure of the product
04 - Single-phase taxable transaction - resale at zero rate
05 - Taxable transaction under tax substitution
06 - Taxable transaction at zero rate
07 - Transaction exempt from the contribution
08 - Transaction not subject to the contribution
09 - Transaction with the contribution suspended
49 - Other outgoing transactions
50 - Transaction with credit right - linked only to taxed revenue in the domestic market
51 - Transaction with credit right - linked only to untaxed revenue in the domestic market
52 - Transaction with credit right - linked only to export revenue
53 - Transaction with credit right - linked to taxed and untaxed revenue in the domestic market
54 - Transaction with credit right - linked to taxed revenue in the domestic market and export revenue
55 - Transaction with credit right - linked to untaxed revenue in the domestic market and export revenue
56 - Transaction with credit right - linked to taxed and untaxed revenue in the domestic market and export revenue
60 - Presumed credit - purchase linked only to taxed revenue in the domestic market
61 - Presumed credit - purchase linked only to untaxed revenue in the domestic market
62 - Presumed credit - purchase linked only to export revenue
63 - Presumed credit - purchase linked to taxed and untaxed revenue in the domestic market
64 - Presumed credit - purchase linked to taxed revenue in the domestic market and export revenue
65 - Presumed credit - purchase linked to untaxed revenue in the domestic market and export revenue
66 - Presumed credit - purchase linked to taxed and untaxed revenue in the domestic market and export revenue
67 - Presumed credit - other transactions
70 - Purchase without credit right
71 - Purchase with exemption
72 - Purchase with suspension
73 - Purchase at zero rate
74 - Purchase not subject to the contribution
75 - Purchase under tax substitution
98 - Other incoming transactions
99 - Other transactions

Issuing an invoice > Providers
Osasco provider

Specific issuing fields in the city of Osasco, on top of the fields in RPS information:

Parameter Required Type Size Description
codigo_servico
string 3-5 Service code
00.00
endereco_local_prestacao
string 9 Address of the place where the service is provided
Required for construction services.
cep_local_prestacao
string 9 CEP of the place where the service is provided
Required for construction services.
cidade_local_prestacao
string 9 City where the service is provided
Required for construction services.
uf_local_prestacao
string 9 State (UF) where the service is provided
Required for construction services.

Issuing an invoice > Providers
National standard (Padrão Nacional)

The national standard (Padrão Nacional) is one national NFS-e system that is replacing the systems of each city hall. These are the fields specific to issuing in the cities that joined it, in addition to the fields in RPS information:

Note: In the national standard (model padrao_nacional), servico.tributacao_iss sets how ISSQN (the city service tax, ISS) applies. It does not replace the rate in servico.impostos.iss, which the API accepts when you send it. The IBS/CBS fields cover different taxes.
Parameter Required Type Size Description
codigo_servico
string 6 Service code
00.00.00
codigo_tributacao_municipio
string 3 or 3-9 City tax code. It usually has 3 characters. The NotaControl Padrão Nacional provider accepts 3 to 9. Required for IMA Padrão Nacional and for NotaControl in Brasília/DF and Goiânia/GO. Values made only of zeros are ignored.
identificador_beneficio_municipal
string 14 Identifier of the city tax benefit, with 14 digits. Required when you send servico.impostos.reducao.
tributacao_iss
number 1 How ISSQN applies to the service provided
1 - Taxable transaction
2 - Immunity
3 - Service export
4 - Not subject to the tax (Não Incidência)
tipo_imunidade
number 1 Type of ISSQN immunity. Only for the Immunity case
0 - Immunity (type not stated on the original invoice)
1 - Assets, income or services of government entities, of one another (CF88, Art 150, VI, a)
2 - Temples of any religion (CF88, Art 150, VI, b)
3 - Assets, income or services of political parties, including their foundations, of workers' unions, and of non-profit education and social assistance institutions that meet the legal requirements (CF88, Art 150, VI, c)
4 - Books, newspapers, periodicals and the paper used to print them (CF88, Art 150, VI, d)
5 - Music recordings and music videos produced in Brazil with musical or lyrical-musical works by Brazilian authors and/or works in general performed by Brazilian artists, and the physical media or digital files that contain them, except at the stage of industrial replication of laser-read optical media. (CF88, Art 150, VI, e)
pis_cofins_retido
number 1 Withholding of PIS/COFINS (federal revenue taxes)
0 - PIS/COFINS/CSLL not withheld
1 - PIS/COFINS withheld (transition)
2 - PIS/COFINS not withheld (transition)
3 - PIS/COFINS/CSLL withheld
4 - PIS/COFINS withheld, CSLL not withheld
5 - PIS withheld, COFINS/CSLL not withheld
6 - COFINS withheld, PIS/CSLL not withheld
7 - PIS not withheld, COFINS/CSLL withheld
8 - PIS/COFINS not withheld, CSLL withheld
9 - COFINS not withheld, PIS/CSLL withheld
data_competencia
string 10 Accrual date (competência)
Format: YYYY-MM-DD
codigo_nbs
string 9 NBS code (Brazilian Nomenclature of Services), with 9 digits.
codigo_interno
string 1-20 Internal code of the taxpayer, with 1 to 20 alphanumeric characters.
aliquota_tributos_aproximados
number 0-100 Rate of the approximate taxes for Simples Nacional (small business regime).
uf_local_prestacao
string 2 State (UF) where the service is provided. Required when you send cidade_local_prestacao.
cidade_local_prestacao
string 1-25 City where the service is provided. Required when you send uf_local_prestacao.
informacoes_complementares
string 1-2000 Additional information about the service provided.
deducao_reducao
object --- Object for the deduction/reduction of the tax base

Foreign trade

For cities on the padrao_nacional model, you can send the fields below in servico when the transaction involves foreign trade.

Important: when you send any foreign trade parameter, also send every required field of the block.
IN EFFECT Change in the national standard provider from Dec 7, 2026

Already available in the sandbox (test environment) for testing. In production, the API rejects the new fields of this section until Dec 7, 2026, and valor_servico_moeda stays required until that date. See the summary in Changes to the national standard NFS-e.

Parameter Required Type Size Description
modo_prestacao
number 1 Mode of supply.
0 - Unknown (type not stated on the original invoice)
1 - Cross-border
2 - Consumption in Brazil
3 - Temporary movement of individuals
4 - Consumption abroad
5 - Consumption in Brazil and abroad at the same time (in production, from Dec 7, 2026)
vinculo_prestacao
number 1 Relationship between the parties in the transaction.
0 - No relationship with the service buyer/service provider
1 - Controlled company
2 - Controlling company
3 - Affiliated company
4 - Head office
5 - Branch or subsidiary office
6 - Other relationship
tipo_moeda
string 3 Currency of the commercial transaction.
E.g.: 840 (USD), 978 (EUR)
valor_servico_moeda
number 15v2 Amount of the service in the currency set in tipo_moeda. Required in production until Dec 7, 2026. From that date, and already in the sandbox, you may keep sending it, but it is no longer used.
0.00
mecanismo_apoio_comex_prestador
string 2 Foreign trade support or promotion program used by the service provider (prestador).
00 - Unknown (type not stated on the original invoice)
01 - None
02 - ACC - Advance on Exchange Contract (IR and IOF reduced to zero)
03 - ACE - Advance on Delivered Exchange Bills (IR and IOF reduced to zero)
04 - BNDES-Exim Post-Shipment (Services)
05 - BNDES-Exim Pre-Shipment (Services)
06 - FGE - Export Guarantee Fund
07 - PROEX - Equalization
08 - PROEX - Financing
mecanismo_apoio_comex_tomador
string 2 Foreign trade support or promotion program used by the service buyer (tomador).
00 - Unknown (type not stated on the original invoice)
01 - None
02 - Public administration and international representation
03 - Rental and leasing of machines, equipment, vessels and aircraft
04 - Leasing of aircraft to a public air transport company
05 - Commission to foreign agents on exports
06 - Storage, handling and transport of cargo abroad
07 - FIFA events (subsidiary)
08 - FIFA events
09 - Freight, leasing of vessels or aircraft, and others
10 - Aeronautical material
11 - Promotion of goods abroad
12 - Promotion of Brazilian tourist destinations
13 - Promotion of Brazil abroad
14 - Promotion of services abroad
15 - RECINE
16 - RECOPA
17 - Registration and maintenance of trademarks, patents and plant varieties
18 - REICOMP
19 - REIDI
20 - REPENEC
21 - REPES
22 - RETAERO
23 - RETID
24 - Royalties, technical and scientific assistance, and similar
25 - Conformity assessment services linked to WTO (OMC) agreements
26 - ZPE
movimento_temporario_bens
number 1 Link of the transaction to a temporary movement of goods.
0 - Unknown (type not stated on the original invoice)
1 - No
2 - Linked - Single Import Declaration (DUIMP)
3 - Linked - Single Export Declaration (DU-E)
numero_duimp
string 15 Number of the Single Import Declaration (DUIMP). Required when movimento_temporario_bens = 2. Do not send it when the value is 1.
numero_due
string 14 Number of the Single Export Declaration (DU-E). Required when movimento_temporario_bens = 3. Do not send it when the value is 1.
numero_fatura
string 1-20 Number of the commercial invoice, digits only.
valor_fatura
number 15v2 Amount of the commercial invoice.
numero_contrato_cambio
string 1-20 Number of the foreign exchange contract, digits only.
mdic
number 1 Share the NFS-e information with the Foreign Trade Secretariat (MDIC).
0 - Do not send to MDIC
1 - Send to MDIC

Foreign trade example (servico), accepted in production and in the sandbox:

{
  "modo_prestacao": 1,
  "vinculo_prestacao": 2,
  "tipo_moeda": "840",
  "valor_servico_moeda": "1250.00",
  "mecanismo_apoio_comex_prestador": "01",
  "mecanismo_apoio_comex_tomador": "10",
  "movimento_temporario_bens": 1,
  "mdic": 1
}

Example with a DU-E, a commercial invoice and a foreign exchange contract (servico), accepted in the sandbox and, from Dec 7, 2026, in production:

{
  "modo_prestacao": 1,
  "vinculo_prestacao": 2,
  "tipo_moeda": "840",
  "mecanismo_apoio_comex_prestador": "01",
  "mecanismo_apoio_comex_tomador": "10",
  "movimento_temporario_bens": 3,
  "numero_due": "26BR0000012345",
  "numero_fatura": "123456",
  "valor_fatura": "1250.00",
  "numero_contrato_cambio": "987654",
  "mdic": 1
}

Issuing an invoice > Providers
São Paulo provider

Fields specific to issuing in the city of São Paulo, in addition to the fields in RPS information:

Parameter Required Type Size Description
codigo_servico
string 4-5 digits City service code, normalized to digits
00000
tipo_tributacao
string 1 Taxation type of the service
T – Taxed in São Paulo
F – Taxed outside São Paulo
A – Taxed in São Paulo, but exempt
B – Taxed outside São Paulo, but exempt
D – Taxed in São Paulo with partial exemption
M – Taxed in São Paulo, but with subjective immunity
N – Taxed outside São Paulo, but with subjective immunity
R – Taxed in São Paulo, but with objective immunity
S – Taxed outside São Paulo, but with objective immunity
X – Taxed in São Paulo, but with suspended liability (Exigibilidade Suspensa)
V – Taxed outside São Paulo, but with suspended liability (Exigibilidade Suspensa)
P – Service export
Default: T – Taxed in São Paulo
data_competencia
string 10 Accrual date (competência)
Format: YYYY-MM-DD
valor_inicial_cobrado
string 13v2 Initial amount charged for the service (RTC, the consumption tax reform layout), with up to 13 integer digits and 2 decimals.
Optional. In the RTC layout, it takes precedence over valor_final_cobrado when sent.
valor_final_cobrado
string 13v2 Final amount charged for the service (RTC), with up to 13 integer digits and 2 decimals.
Optional. In the RTC layout, if you omit both charged amounts, the API uses valor_servicos as valor_final_cobrado.
valor_multa
string 13v2 Fine applied to the service (RTC)
0.00
valor_juros
string 13v2 Interest applied to the service (RTC)
0.00
valor_ipi
string 13v2 IPI amount (RTC; IPI is the federal tax on manufactured and imported goods), with up to 13 integer digits and 2 decimals.
0.00
In the RTC layout, the API uses zero when you omit it.
pagamento_parcelado_antecipado
number 1 Installment or advance payment indicator (RTC)
1 - Yes
2 - No
pis_cofins_retido
number 1 Withholding of PIS/COFINS. Optional in both versions of the São Paulo layout. This provider does not accept codes 1 and 2.
0 - PIS/COFINS/CSLL not withheld
3 - PIS/COFINS/CSLL withheld
4 - PIS/COFINS withheld, CSLL not withheld
5 - PIS withheld, COFINS/CSLL not withheld
6 - COFINS withheld, PIS/CSLL not withheld
7 - PIS not withheld, COFINS/CSLL withheld
8 - PIS/COFINS not withheld, CSLL withheld
9 - COFINS not withheld, PIS/CSLL withheld
ncm
string 8 NCM code (product code) (RTC)
00000000
codigo_pais_prestacao
string 1-4 Numeric code of the country where the service is provided (BACEN, Central Bank list) (RTC). Accepted only for exports (tipo_tributacao = P). The API requires a location for taxation outside São Paulo. When you send the state (UF) and the city together, they take precedence over this code.
uf_local_prestacao
string 2 State (UF) where the service is provided (RTC)
Required when you send cidade_local_prestacao.
cidade_local_prestacao
string 1-40 City where the service is provided (RTC)
Required when you send uf_local_prestacao.
valor_recebido
string 13v2 Total amount received in R$ for the service provided. A positive value is allowed only for services under subitems 10.08, 33.01 or 17.11 of the city register. It must be greater than or equal to valor_servicos and cannot coexist with positive deducoes. Zero is treated as not sent.
carga_tributaria
string 3v2 Tax burden percentage
0.00
fonte_carga_tributaria
string 1-10 Source of the tax burden figure
IBPT

Issuing an invoice > Providers
SIGISS provider

Fields specific to issuing with the SIGISS provider, in addition to the fields in RPS information:

Parameter Required Type Size Description
codigo_servico
string 3-4 Service code
0000
tributacao
number 1 Taxation type
1 - Taxed at the service provider
2 - Taxed at the service buyer
3 - Exempt
4 - Immune
5 - Not taxed

Issuing an invoice > Providers
Sigissweb provider

Fields specific to issuing with the Sigissweb provider, in addition to the fields in RPS information:

Parameter NFS-e Type Size Description
codigo_nbs
string9NBS code (Brazilian Nomenclature of Services)
Required for the city of Valinhos-SP

Besides the intermediary parameters, you can also send the following parameters when issuing:

Intermediary data
Parameter NFS-e Type Size Description
ie
string1-20IE (Inscrição Estadual, state registration) of the intermediary
uf
string2State (UF) of the intermediary
endereco
string1-60Street address of the intermediary
cep
string8CEP (postal code) of the intermediary
cidade
string1-40City of the intermediary
bairro
string1-40Neighborhood of the intermediary
numero
string1-10Street number of the intermediary address
complemento
string1-60Address complement of the intermediary

Issuing an invoice > Providers
Thema provider

Fields specific to issuing with the Thema provider, in addition to the fields in RPS information:

Parameter Required Type Size Description
codigo_servico
string 5 Service code
00.00
codigo_cnae
string 7 CNAE code (economic activity code)
codigo_tributacao_municipio
string 1-20 City tax code
uf_local_prestacao
string 2 State (UF) where the service is provided
cidade_local_prestacao
string 1-20 City where the service is provided
natureza_operacao
number 1-2 Natureza da operação (nature of the transaction) code
Services provided in the city:
1 - Tax due in the city, with withholding at source required.
2 - Tax due in the city, without withholding at source.
3 - Liability suspended by a court decision.
4 - Tax due in the city, with withholding at source required, taxed under the Single Collection Regime (Simples Nacional).
5 - Exempt.
6 - Immune.
7 - Tax paid under the Single Collection Regime (fixed ISSQN).
8 - Not taxable.
9 - Tax paid under the Single Collection Regime (Simples Nacional).
10 - Tax paid as a fixed amount.
Services provided to other cities in Brazil:
11 - Tax due in the city, with withholding at source required.
12 - Tax due in the city, without withholding at source.
13 - Liability suspended by a court decision.
14 - Tax due outside the city, with withholding at source required.
15 - Exempt.
16 - Immune.
17 - Tax due outside the city, without withholding at source.
18 - Not taxable.
19 - Tax paid under the Single Collection Regime (Simples Nacional).
20 - Tax paid as a fixed amount.
Services provided abroad:
21 - Tax due in the city.
22 - Tax paid under the Single Collection Regime (Simples Nacional).
23 - Not taxable.

Tax reform

The tax reform creates IBS (Imposto sobre Bens e Serviços, the state and city goods and services tax) and CBS (Contribuição sobre Bens e Serviços, the federal goods and services tax). Both now appear on the NFS-e (service invoice), next to ISS (the city service tax). This section shows how to adapt your integration: what to send for each provider, the new fields and the changes to the national standard NFS-e (Padrão Nacional).

Required for Lucro Real and Lucro Presumido from Jan 1, 2026. From January 1, 2026, every company under the actual profit regime (Lucro Real) or the presumed profit regime (Lucro Presumido) must include IBS and CBS when it issues electronic invoices. At Webmania, IBS and CBS are calculated and filled in automatically. Just send the CST (tax status code) and the cClassTrib (tax classification code) of each service. The API then generates the amounts under the tax reform rules.

Quick guide (ISS vs. IBS/CBS)

In practice, how you adapt your integration depends mainly on the provider of your city: the system the city hall uses to authorize NFS-e. It is shown in the field modelo of the endpoint /2/nfse/status.

How to choose the payload:
  • If modelo = padrao_nacional: send impostos.iss when it applies to the taxation of the service. The API accepts the rate, and the indicator servico.tributacao_iss does not replace it. Use the national standard fields in servico (e.g. tributacao_iss, consumidor_final, cod_indicador_operacao). In the taxes, include cst_pis_cofins (when applicable) and ibs_cbs.
  • If it is another provider (e.g. IPM): keep impostos.iss as the city requires. The new tax reform fields may be optional or unavailable. See the Providers section and the API response and errors.

Key difference: impostos.iss is the ISS rate (a city tax). servico.tributacao_iss is the ISSQN (the full name of ISS) taxation indicator in the national standard.

Partial example - national standard (the rate impostos.iss must follow the applicable taxation):

{
  "ambiente": 1,
  "rps": [
    {
      "servico": {
        "valor_servicos": "15.00",
        "discriminacao": "Prestação de Serviço referente ao mês X",
        "finalidade": 0,
        "tributacao_iss": 1,
        "consumidor_final": 1,
        "cod_indicador_operacao": "100501",
        "codigo_servico": "01.05.01",
        "codigo_nbs": "115021000",
        "natureza_operacao": 1,
        "iss_retido": 2,
        "impostos": {
          "cst_pis_cofins": "00",
          "ibs_cbs": {
            "situacao_tributaria": "000",
            "classificacao_tributaria": "000001"
          }
        }
      },
      "tomador": {...}
    }
  ]
}

Example - city provider (e.g. IPM) (send impostos.iss):

{
  "ambiente": 1,
  "rps": [
    {
      "servico": {
        "valor_servicos": "15.00",
        "discriminacao": "Prestação de Serviço referente ao mês X",
        "codigo_servico": "01.05",
        "natureza_operacao": 1,
        "iss_retido": 2,
        "impostos": {
          "iss": "5.00"
        }
      },
      "tomador": {...}
    }
  ]
}

When does it start?

Tax regime When filling in becomes mandatory
Lucro Real / Presumido (actual / presumed profit) Required from January 1, 2026.
Simples Nacional / MEI (small business regime / individual micro-entrepreneur) Mandatory only from 2027.
Note: IBS and CBS will appear on invoices first for companies under Lucro Real and Lucro Presumido. For other tax regimes, such as Simples Nacional, they will appear gradually, as each city enables the feature in its systems.

Tax reform
New tax reform fields

The tax reform added new fields to the NFS-e issuing layout. The table below lists them:

Automatic IBS/CBS calculation.

To calculate IBS and CBS automatically, send situacao_tributaria and classificacao_tributaria in the object servico.impostos.ibs_cbs. You can also use a classe_imposto (Tax Class) that provides this data.

For more information and every available parameter, see the IBS/CBS section.

Note:

Whether the new fields are required or accepted can vary by city and provider. If your city does not use the national standard, see the Providers section and the response of the endpoint /2/nfse/status.

Parameter NFS-e Type Size Description
finalidade
number 1 Purpose of the NFS-e issue. In the RTC validation (the rules of the consumption tax reform), the API sets this field automatically to 0 - Normal. The values 1 and 2 do not select a replacement or a complement.
0 - Regular NFS-e
1 - Credit NFS-e (preview, not accepted yet; treated as 0 today)
2 - Debit NFS-e (preview, not accepted yet; treated as 0 today)

See Upcoming changes (preview).
tipo_operacao
number 1 Operation type. Optional, and allowed only for government purchases or for these services of the federal service list (LC 116/2003): 10.05; 15.09; 17.12; 25.05. With the São Paulo provider, the API checks the city codes and may fill in 1 automatically when it applies. In the national standard, types 2 and 3 require nfses_referenciadas.
1 - Supply with later payment
2 - Receipt of payment for a supply already made
3 - Supply with payment already received
4 - Receipt of payment with later supply
5 - Supply and receipt of payment at the same time
consumidor_final
number 1 Indicates an operation for personal use or consumption
0 - No
1 - Yes
cod_indicador_operacao
string 6 Operation indicator code of the supply. See the spreadsheet (in Portuguese).
indicador_zfm_alc
number 1 Manaus Free Trade Zone / Free Trade Areas indicator (Zona Franca de Manaus / Áreas de Livre Comércio). When 1, cod_indicador_operacao must be one of the codes of Annex VI (NT 007).
0 - No
1 - Yes
indicador_destinatario
number 1 When 1, the group destinatario at the RPS level is required. See Recipient.
0 - No
1 - Yes
imovel
object - Real estate (property) information group. Required when cod_indicador_operacao starts with 02 (real estate operations: 020101, 020201, 020301) and the service is NOT construction. See Real estate. Changes in the national standard from Dec 7, 2026.
outras_informacoes
string 1-2000 Additional information of the invoice — tax reform.
condicao_pagamento
object - Payment terms at the RPS level, if the provider supports them. Subfields: condicao (string), qtd_parcela (int), parcelas[] (array of objects with data_vencimento and valor).
nfses_referenciadas
array 0-99 List of referenced NFS-e (send the access key). In the national standard, it is required when tipo_operacao is 2 or 3, and it references the NFS-e of the original operation. It is also used to issue a replacement or complementary invoice.
ente_governamental
object - Identifies the public entities that take part, when applicable.
destinatario
object - Recipient of the operation at the RPS level. Required when servico.indicador_destinatario = 1. Do not send it when the indicator is 0.
reembolso_repasse
object - Reimbursement/pass-through information that counts in the tax base of ISSQN, IBS and CBS. In the national standard, from Dec 7, 2026, see Tax base adjustment.

Tax reform
Changes to the national standard NFS-e

From Dec 7, 2026, invoices issued through the Padrão Nacional provider follow new rules. The sandbox (homologação, the test environment) already has them, so you can test your integration before that date. The changes apply only to the national standard provider; other city providers are not affected. To find your city's provider, see the field modelo of the endpoint /2/nfse/status and the section Providers › National standard.

For most invoices, nothing changes.

The same JSON you send today is still accepted, and the API adapts it to the new invoice format. You only need to adjust your integration if you:

  • send a property on the invoice (real estate operations and real estate leases);
  • send a deduction/reduction or a reimbursement/pass-through with documents;
  • issue invoices for leases of movable goods (service 99.04.01);
  • will use the new service codes of item 99;
  • issue foreign trade invoices with a DUIMP, a DU-E, a commercial invoice or a foreign exchange contract;
  • issue services of subitem 17.10 (events).

Summary and timeline

Change Sandbox Production
IN EFFECT Real estate, movable goods, tax base adjustment, new service codes and operation indicator codes, foreign trade and event activities Available for testing From Dec 7, 2026
PREVIEW Upcoming changes (Simples Nacional, credit/debit invoices, donations, linked payments and others) Not accepted by the national standard yet No date set

Until Dec 7, 2026, in production, the API rejects the new fields (imovel.locacao, imovel.unidades[], servico.bens_moveis[], servico.ajuste_base_calculo and the new foreign trade and event fields) and the new service codes. Use them only in the sandbox until that date.

What changes in your integration

Your situation What to do from Dec 7, 2026 Details
NFS-e without a property, without deduction/reimbursement and without the new codes Nothing. Keep sending it as you do today. -
Property with a Brazilian address and a CEP (postal code) Nothing. Still accepted; the API finds the city from the CEP. Real estate
Property identified by the CIB (Brazilian real estate registry code) Also send imovel.codigo_municipio when there is no CEP. Real estate
Property identified only by its city property registration (inscrição imobiliária) No longer accepted. Add the CIB (with the city) or the Brazilian address; the registration becomes complementary. Real estate
Property with an address abroad No longer accepted. The national standard does not accept a property outside Brazil. Real estate
Lease, paid assignment or leasing of real estate (99.03.xx) Send imovel.locacao with the co-ownership percentage and the total amount of the operation. Lease
More than one property on the same invoice Use the list imovel.unidades[]. Units
Lease of movable goods (99.04.01) Send servico.bens_moveis[] together with impostos.ibs_cbs. Movable goods
Deduction/reduction or reimbursement/pass-through with documentos Send valor_total in each document (and data_competencia for a deduction/reduction). Deduction types 1 and 4, and city or non-tax documents, must go in the group ajuste_base_calculo. Tax base adjustment
Deduction/reduction by percentual or valor Nothing. Still accepted and converted automatically. Tax base adjustment
Foreign trade with an import or export declaration, a commercial invoice or a foreign exchange contract Send numero_duimp or numero_due according to movimento_temporario_bens. When they exist, also send numero_fatura, valor_fatura and numero_contrato_cambio. numero_di and numero_re are no longer used. Foreign trade
Services of subitem 17.10 (events) Send atividades_evento. In subitems 12.13 and 17.10, you can send the city of the event in atividades_evento.codigo_municipio. Events

Example — property identified only by the CIB: today

{
  "imovel": {
    "codigo_cib": "12345678"
  }
}

From Dec 7, 2026, also send the city of the property:

{
  "imovel": {
    "codigo_cib": "12345678",
    "codigo_municipio": "3550308"
  }
}

Example — property identified only by its city property registration: today

{
  "imovel": {
    "inscricao_imobiliaria": "001234"
  }
}

From Dec 7, 2026, add the Brazilian address (or the CIB with the city):

{
  "imovel": {
    "inscricao_imobiliaria": "001234",
    "endereco": "Av. Paulista",
    "numero": "1000",
    "bairro": "Bela Vista",
    "cep": "01310100"
  }
}

New service codes

Available in the sandbox and, from Dec 7, 2026, in production.

Code Description Note
99.02.01 Operations with intangible goods not classified in earlier items -
99.03.01 Lease of real estate Requires imovel.locacao
99.03.02 Paid assignment of real estate
99.03.03 Leasing (arrendamento) of real estate
99.03.04 Easement, or assignment of use or of space, of real estate (when not subject to ISSQN)
99.03.05 Permission of use or right of way over real estate (when not subject to ISSQN)
99.04.01 Lease of movable goods Requires servico.bens_moveis[]

Code 99.05.01 (condominium operations) is not available yet.

New operation indicator codes

New values accepted in cod_indicador_operacao, available in the sandbox and, from Dec 7, 2026, in production. The current codes remain valid.

Code Description
010202 Purchase of a motor vehicle at a government auction of seized or abandoned goods, or at a court auction
020102 Operation with real estate, or with intangible movable goods (including rights), related to real estate with special characteristics (BICE)
020202 Service provided physically on real estate with special characteristics (BICE)
020401 Lease, sublease, leasing, right of way or permission of use of railways, highways, poles, cables, ducts and conduits of any kind (when subject to ISSQN)

For the CSTs (situacao_tributaria) 400, 410, 620, 800, 810, 811 and 820, do not send cod_indicador_operacao, credito_presumido, situacao_tributaria_regular, classificacao_tributaria_regular or aliquota_diferimento. From Dec 7, 2026, these fields are rejected for these statuses.

Foreign trade

Available in the sandbox and, from Dec 7, 2026, in production. The other foreign trade fields stay as they are today (see Providers › National standard › Foreign trade).

Foreign trade · in servico
Parameter Type Size Description
numero_duimp string 15 Number of the Single Import Declaration (DUIMP). Required when movimento_temporario_bens = 2.
numero_due string 14 Number of the Single Export Declaration (DU-E). Required when movimento_temporario_bens = 3.
numero_fatura string 1-20 Commercial invoice number, digits only.
valor_fatura decimal 15v2 Commercial invoice amount.
numero_contrato_cambio string 1-20 Foreign exchange contract number, digits only.
modo_prestacao = 5 number 1 New value of the service delivery mode.
5 - Consumption in Brazil and abroad at the same time
On imports, send in valor_servicos only the part consumed in Brazil; on exports, only the part exported.
ajuste_base_calculo.ajuste_ibscbs_comercio_exterior string 13v2 Adjustment of the IBS and CBS tax base on exports (tributacao_iss = 3). Accepts a negative sign.
E.g.: "-150.00"

Until Dec 7, 2026, in production, the API rejects these fields and the whole group ajuste_base_calculo, and valor_servico_moeda is still required. From that date, and already in the sandbox, you may keep sending valor_servico_moeda, but it is no longer used.

Event activities

Available in the sandbox and, from Dec 7, 2026, in production.

Event activities · in rps[].atividades_evento
Parameter Type Size Description
codigo_municipio string 7 IBGE code of the city where the event takes place, in rps[].atividades_evento. Accepted only in subitems 12.13 and 17.10. It must differ from the city where the service is provided.
Subitem 17.10 now requires atividades_evento, like item 12.

Upcoming changes (preview) PREVIEW

Not accepted by the national standard yet, not even in the sandbox.

Use the fields below to plan your integration. Names and rules may still change before release; we will let you know when they are available. The column If sent today shows what the API currently does if you send the field.

Simples Nacional · in servico
Parameter Type Size Description If sent today
regime_apuracao_ibscbs_sn number 1 IBS and CBS calculation regime of a service provider (prestador) under Simples Nacional (ME/EPP, micro and small companies).
1 - IBS and CBS calculated under Simples Nacional
2 - CBS calculated under Simples Nacional and IBS under the regular regime
3 - IBS and CBS calculated under the regular regime

After the national standard confirms the rules, this field will probably move to the company settings, with no need to send it on each invoice.
Ignored

The calculation regime will be required for service providers under Simples Nacional (ME/EPP). It will not be accepted for an MEI (individual micro-entrepreneur) or for a company outside Simples Nacional.

Credit and debit invoices · in servico
Parameter Type Size Description If sent today
finalidade = 1 or 2 number 1 Issue of an adjustment invoice.
1 - Credit NFS-e
2 - Debit NFS-e
Ignored (treated as 0)
tipo_credito number 1-2 Type of the credit NFS-e, required with finalidade 1.
01 - Fines and interest
05 - Credit transfer in a succession
Ignored
tipo_debito number 1-2 Type of the debit NFS-e, required with finalidade 2.
01 - Credit transfer to cooperatives
02 - Credit cancellation for immune/exempt outputs
03 - Debits of invoices not processed in the tax calculation
04 - Fines and interest
05 - Credit transfer in a succession
06 - Advance payment
Ignored
impostos.ibs_cbs.ajuste object - IBS (valor_ibs) and CBS (valor_cbs) amounts of the adjustment, with up to two decimal places. Required for debit types 01, 02, 03 and 05 and for credit type 05; not accepted for the other types. Ignored
Donation and credit reversal · in servico
Parameter Type Size Description If sent today
indicador_doacao number 1 Indicates a donation. Required with the cClassTrib codes 410003 and 410026.
1 - Donation
Ignored
impostos.ibs_cbs.estorno_credito object - Reversal of IBS (valor_ibs) and CBS (valor_cbs) credit on a donation. Required only with the classification 410026 and indicador_doacao 1. Each amount must be lower than valor_servicos. Ignored
Linked payments · items of servico.pagamentos_vinculados[] (1 to 99 items, requires impostos.ibs_cbs)
Parameter Type Size Description If sent today
n_pag integer 1-999 Payment number, unique in the list. Ignored
id_transacao string 2-35 Transaction identifier, unique in the list.
tp_meio_pagamento string 2 Payment method (Pix is the instant payment system of the Brazilian Central Bank).
15 - Boleto (bank payment slip)
17 - Dynamic Pix QR Code
18 - TED (bank transfer)
20 - Pix key or static QR Code
23 - Automatic Pix
24 - TEF / book transfer
cnpj_recebedor string 14 CNPJ (company ID) of the payee, with valid check digits.
cnpj_base_psp string 8 Root of the CNPJ of the payment institution, alphanumeric.
Other planned changes
Change Description Today
PIS/COFINS withholding When pis_cofins_retido is not sent, it will become 0 (PIS/COFINS/CSLL not withheld) or 8 (only CSLL withheld, when there is CSLL). PIS and COFINS are federal revenue taxes; CSLL is a federal tax on profit. A value you send is still respected. If missing, treated as 2 (PIS/COFINS not withheld)
Real estate lease adjustments The limit of adjustments per property (imovel.ajustes[] and unidades[].ajustes[]) will drop from 1,000 to 10. Limit of 1,000

Tax reform
Changes to the São Paulo NFS-e (RTC) PREVIEW

The São Paulo provider will accept the groups for tax base adjustment, foreign trade, donation, credit reversal and linked payments, with the same parameters as the national standard. It will also accept the country where the service result occurs. To find the city's provider, see the field modelo of the endpoint /2/nfse/status.

Not accepted in São Paulo yet, not even in the sandbox.

As with the national standard, the rules below are for planning your integration and may change before release; we will let you know when they are available. Until then, if you send these fields for São Paulo, the API ignores them and issues the invoice as it does today.

The parameters are the same as in the national standard.

When the change is released, São Paulo will accept the groups of this section built for the national standard, subject only to the 6 São Paulo restrictions. The other invoice fields, such as codigo_servico, still follow the rules of the São Paulo provider. The only new parameter exclusive to São Paulo is codigo_pais_resultado.

Timeline

Change Sandbox Production
PREVIEW Tax base adjustment, foreign trade, donation, credit reversal, linked payments and country where the service result occurs Not accepted by São Paulo yet No date set

After the release, the API will choose the group by the issue date of the invoice. Invoices issued up to Nov 30, 2026 stay in the reimbursement/pass-through group. They accept only the reimbursement types 101, 102, 103, 104 and 199, or 01, 02, 03, 04 and 99 in tipo_reembolso. Invoices issued from Dec 1, 2026 use the tax base adjustment group, with every type.

Who must adapt

For most invoices in São Paulo, nothing will change: the JSON you send today will still be accepted. When the change is released, you will need to adjust your integration if you:

  • send a reimbursement/pass-through with documents: send valor_total in each document (the API does not calculate this total from the applied amount) and the supplier name (fornecedor.nome or fornecedor_referenciado.nome) with up to 75 characters;
  • use a cClassTrib (tax classification) that starts with 550 in impostos.ibs_cbs.classificacao_tributaria: also send classificacao_tributaria_regular;
  • will use the new fields of this section.

Rules for the new fields

The rules of this subsection and the next ones will apply after the release.

  • Also send servico.impostos.ibs_cbs; without this group, the API will reject the request. If a request with several RPS uses these fields, every RPS must be issued with IBS/CBS.
  • Send money amounts as strings or integers, for example "10.50" or 10. For cents, use a string with a dot and up to two decimal places. JSON decimal numbers are not accepted.

Where the parameters are

Each group below is documented in the national standard section, with the full list of fields, types and sizes. In São Paulo, the parameter names will be the same.

Group Parameters Where to see the fields
Tax base adjustment servico.ajuste_base_calculo.documentos[] Tax base adjustment
Reimbursement/pass-through (current form) servico.reembolso_repasse.documentos[]
Still accepted. For invoices issued from Dec 1, 2026, it is converted automatically to the tax base adjustment. Up to Nov 30, 2026, it stays in the reimbursement/pass-through group.
Reimbursement/Pass-through
Foreign trade modo_prestacao, vinculo_prestacao, tipo_moeda, valor_servico_moeda, mecanismo_apoio_comex_prestador, mecanismo_apoio_comex_tomador, movimento_temporario_bens and mdic, in servico Foreign trade
Foreign trade (new fields) numero_duimp, numero_due, numero_fatura, numero_contrato_cambio, valor_fatura and ajuste_base_calculo.ajuste_ibscbs_comercio_exterior, in servico Upcoming changes *
Donation and credit reversal servico.indicador_doacao and servico.impostos.ibs_cbs.estorno_credito Upcoming changes *
Linked payments servico.pagamentos_vinculados[] Upcoming changes *
Country where the service result occurs
SÃO PAULO ONLY
servico.codigo_pais_resultado Country where the service result occurs

* Groups that are also in the national standard preview. In São Paulo, until they are released, the API ignores them.

São Paulo restrictions

The São Paulo city hall receives the invoice in its own layout and shares it with the national environment. This layout imposes only the restrictions below. On every other point, the national standard documentation applies. The fields are in servico, unless another path is shown.

Parameter In São Paulo
ajuste_base_calculo.percentual_iss
ajuste_base_calculo.valor_iss
Not accepted. Send the adjustment through documentos.
ajuste_base_calculo.documentos[].fornecedor.nome
reembolso_repasse.documentos[].fornecedor_referenciado.nome
Up to 75 characters (150 in the national standard).
numero_fatura
numero_contrato_cambio
Exactly 20 digits. The API does not pad the numbers with zeros.
pagamentos_vinculados[].id_transacao Only digits and uppercase letters, from 2 to 35 characters. The API does not convert lowercase letters.
ajuste_base_calculo.ajuste_ibscbs_comercio_exterior Does not accept a negative value.
impostos.ibs_cbs.classificacao_tributaria_regular Required when classificacao_tributaria starts with 550.
National standard validations that the API does not repeat in São Paulo

São Paulo will accept the groups of this section built for the national standard and within the restrictions above. In São Paulo, the API will not require the extra validations of the national standard; the city hall is responsible for them:

  • indicador_doacao accepts 0 or 1, and impostos.ibs_cbs.estorno_credito can be sent with any cClassTrib;
  • mdic and valor_servico_moeda are optional (valor_servico_moeda is not sent to the city hall); modo_prestacao also accepts 5, and vinculo_prestacao also accepts 9;
  • in adjustment and reimbursement documents, descricao is optional outside types 99 and 199, dfe_outro has no tax period restriction, doc_outro is accepted in every type and, for invoices issued from Dec 1, 2026, data_emissao and data_competencia are optional.

Country where the service result occurs SÃO PAULO ONLY

Parameter Required Type Size Description
servico.codigo_pais_resultado
string 1-4 digits Numeric BACEN (Central Bank of Brazil) code of the country where the result of the service occurred. Optional. The API converts the code to the two-letter country code and rejects codes of countries that do not exist.
E.g.: 2496 (United States), 6076 (Portugal), 639 (Argentina)

São Paulo example

Part of servico with one reimbursement document and the country where the service result occurs. The amounts are strings, and valor_total is sent. Also send the group impostos.ibs_cbs, left out of the example.

{
  "valor_servicos": "1000.00",
  "codigo_pais_resultado": "2496",
  "ajuste_base_calculo": {
    "documentos": [
      {
        "tipo": "199",
        "descricao": "Reembolso de despesas pagas por conta do cliente",
        "valor_total": "300.00",
        "valor_aplicado": "300.00",
        "data_emissao": "2026-11-20",
        "data_competencia": "2026-11-20",
        "dfe_nacional": {
          "tipo_chave_dfe": 2,
          "chave_dfe": "41261112345678000195550010000012341000012343"
        }
      }
    ]
  }
}

You can also send the same document in the current form, in reembolso_repasse.documentos[], with tipo_reembolso 99 and valor instead of tipo and valor_aplicado; the API converts it.

Functions
Download the XML and PDF

The XML and the PDF of each document are at the URLs returned in the response, in the lookup and in the notification. For security, Webmania restricts access to these files.

The tax document is protected with a password. It opens only after you confirm the CPF/CNPJ (tax ID) of the document recipient, or with one of the access methods below: Access credentials, Token, Issuing IP or Webmania® Panel.

Tax documents in your system. When you make the XML and the PDF available in your system, use access restrictions like the ones Webmania uses. Do not allow public access to tax documents that are not protected with a password.

Ways to access the files:

Authentication Access allowed Password required? Description
Access credentials ✅ No Send the company's access credentials in the request HEADER to access every tax document issued by the company.
Authorization: Bearer YOUR_ACCESS_TOKEN
Token ✅ No Send the encrypted token in the URL to open the tax document for 24 hours without a password. Ideal for sharing a link.
?token=[TOKEN]
The token is not available for tax documents without a recipient.
Issuing IP ✅ No When you issue an invoice, the IP address of the computer or server is permanently registered as authorized. That IP can access every tax document issued by the companies it has access to.
IPs authorized automatically
Webmania® Panel ✅ No When you log in to the Webmania® Panel, you can access every tax document issued by the companies of your account. Access lasts while you are logged in to the Webmania® Panel.
Access while you are logged in
No authentication ❌ Yes When the URL is opened publicly, without authentication, the tax documents are protected with a password. To open them, enter the CPF/CNPJ of the document recipient (numbers only, no punctuation).
PDF = password-protected PDF file
XML = password-protected ZIP file

Access without authentication is not available for tax documents without a recipient.

To download the files to your server, use the Access credentials. To give your customer a link without a password, use the Token.

Functions > Download the XML and PDF
Access credentials

With the company's access credentials in the request header, you can download every tax document issued by the company.

To download a file, send a GET request to the URL of the XML or the PDF, with the credentials in the header. Example with the PDF:

curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
https://api.webmania.com.br/nfse/00000000-0000-0000-0000-000000000000

The response is the file itself, as application/pdf or text/xml.

Functions > Download the XML and PDF
Token

The token opens the XML and the PDF without a password for 24 hours, so you can share the link with your customer safely.

Note. This feature is not available for tax documents without a recipient. For these documents, use the Access credentials.

To share the file, generate the token encrypted with AES-256-CBC and send it in the token parameter of the file URL:

https://api.webmania.com.br/nfse/00000000-0000-0000-0000-000000000000?token=[TOKEN]

The step-by-step guide to generate the token, with functions in PHP, Python, Java, C# and Ruby, is on the Webmania GitHub (in Portuguese): https://github.com/webmaniabr/DFeToken.

Functions
Look up an invoice

The lookup returns the current status of an NFS-e (service invoice), even while it is processando or contingencia. Use the notifications to follow your invoices day to day. Use the lookup to check one invoice when you need to.

To look up an invoice, send a GET request to /2/nfse/consulta/{identifier}. Replace {identifier} with the uuid or the ID (order number or processing ID) of the invoice.

curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
https://api.webmania.com.br/2/nfse/consulta/43eace5c-8008-4f6c-b830-b6d52d7ff90c

The response follows the model and the state of the document. Empty fields may be left out. The NFS-e data, the PDFs and the log depend on the provider and on the processing. The response may include uuid, status, motivo, chave (access key of the NFS-e, when available), numero, codigo_verificacao, serie_rps, numero_rps, pdf_rps, pdf_nfse, pdf_nfse_status, xml and log.

Example HTTP 200 response for a single authorized invoice (not a batch):

{
  "uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
  "modelo": "nfse", // Invoice model (nfse, lote_rps)
  "status": "aprovado", // Example state; during processing, the value can be processando
  "motivo": "Autorizado o uso da NFS-e", // Reason for the status
  "chave": "[chave_de_acesso]", // Access key of the NFS-e (when available)
  "numero": "25000", // NFS-e number
  "codigo_verificacao": "SFH-046", // Verification code of the NFS-e
  "serie_rps": "A1", // RPS series
  "numero_rps": "2000", // RPS number
  "pdf_rps": "https://api.webmania.com.br/darps/[uuid]",
  "pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]", // City hall PDF of the NFS-e (when available)
  "pdf_nfse_status": "processado",  // processado, processando, indisponivel (when available)
  "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
  "log": {...}, // Response log from the city hall
  "atualizado_em": "2024-01-01T12:00:00-03:00" // Time of the last status change
}

Functions
Cancel an invoice or a scheduled issue

Cancellation voids an authorized NFS-e at the city hall. It also stops a scheduled issue (agendamento: an invoice set to be issued on a later date) before it is sent. It is available for documents with the status agendado or aprovado. To issue a new invoice in place of an authorized one, use the replacement function below instead.

To cancel an invoice or a scheduled issue, send a PUT request to /2/nfse/cancelar with the uuid or the codigo_verificacao of the document. Send an ID that is not empty. If you send both, the codigo_verificacao takes precedence to find the document.

SituationWhat to sendWhat happens
Scheduled issue (agendado)The ID. The motivo (reason) is not required.The scheduled issue is stopped. No cancellation request goes to the city hall.
Authorized invoice (aprovado)The ID and the motivo. The justificativa (justification) is optional.A regular cancellation depends on the eligibility of the certificate, the city and the environment.
Simplified invoiceThe ID. You may leave out motivo and justificativa.It follows its own flow, with default values for the fields left out. It does not widen the reasons accepted in this request.

In the initial validation, motivo and justificativa are optional. When you send them, they must follow the values and limits in the table below. Errors in this validation return HTTP 200 with the error field. Passing the validation or getting HTTP 200 does not prove the tax cancellation: check the status in the response body and the final status of the document.

Parameter NFS-e Type Size Description
uuid
string 36 UUID of the NFS-e, with exactly 36 characters. Required when codigo_verificacao is missing or empty.
codigo_verificacao
string - Verification code of the NFS-e. Required when uuid is missing or empty. The validation sets no specific size limit; use the non-empty ID of the document. It takes precedence when you send both IDs.
motivo
number or string 1 Reason for the cancellation. Optional in the initial validation. Required for the regular cancellation of an authorized invoice. Not needed when you cancel only a scheduled issue. When sent, it accepts only the values below, as a number or a numeric string. The simplified flow has its own restrictions and does not widen these values.
1 - Issuing error
2 - Service not provided
4 - Duplicate invoice
justificativa
string 15-255 Justification for the cancellation. Optional in the initial validation. When sent, it must have 15 to 255 characters. The specific requirements of the city or the provider still apply.

Example request for the regular cancellation of an authorized invoice (replace the UUID and the token with those of your integration):

curl -X PUT \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
   "uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c",
   "motivo": 1
}' \
https://api.webmania.com.br/2/nfse/cancelar

Example HTTP 200 response for a completed cancellation. The actual response depends on the state of the document and on the processing result. When the cancellation of an authorized invoice is complete, Webmania also sends the notification cancelado. The cancellation of a scheduled issue is not notified.

{
  "uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
  "status": "cancelado",
  "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
  "log": {...} // Response log from the city hall
}

Functions
Replace an invoice

Replacement (substituição) issues a new NFS-e in place of an invoice that was already issued, for example to fix an issuing error. The new invoice is a new document, with its own UUID. The response identifies the replaced invoice in nfse_substituida. The replaced invoice changes to cancelado, and Webmania sends its notification. This function depends on the provider: check that the funcoes field in City status includes substituir.

To replace an invoice, send a POST request to /2/nfse/substituir with the ambiente, the codigo_verificacao or the national chave (access key) of the invoice to replace, the motivo and the rps array of the new invoice.

Parameter NFS-e Type Size Description
ambiente
number 1 Environment of the replacement issue. 1 - Production
2 - Sandbox
codigo_verificacao
string 1 or more Verification code of the invoice to replace. Required when chave is not sent.
motivo
number 1-2 Reason for the replacement
1 - Issuing error
2 - Service not provided
4 - Duplicate invoice
99 - Other (requires a justification)
rps
array 1-50 Array of RPS objects for the replacement, subject to the restrictions of the provider. Each item must contain the data of the new NFS-e.
chave
string 50 National access key of the NFS-e to replace. Required when codigo_verificacao is not sent.
justificativa
string 15-255 Justification for the replacement. Required when motivo = 99.

Example replacement request:

curl -X POST \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
   "ambiente": 1,
   "codigo_verificacao": "XXX-XXX",
   "motivo": 1,
   "rps": [
     {
       ...
     }
   ]
}' \
https://api.webmania.com.br/2/nfse/substituir

Example HTTP 200 response for an authorized replacement:

{
  "uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
  "status": "aprovado",
  "numero": "340",
  "codigo_verificacao": "XXX-XXX",
  "serie_rps": "A2",
  "numero_rps": "99",
  "nfse_substituida": {
    "uuid": "8f54e040-4344-4169-a9e7-daacd35bcfb1",
    "numero": "95",
    "codigo_verificacao": "XXX-XXX",
  },
  "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
  "log": {...} // Response log from the city hall
}

Functions
Acknowledge participation

Acknowledgment (manifestação) is available only in the national standard (Padrão Nacional). It lets the service buyer (tomador) or the intermediary confirm or reject their participation in an NFS-e issued against them. It depends on the eligibility of the city and of the certificate for the national standard.

To acknowledge participation, send a PUT request to /2/nfse/manifestar with the parameters in the table below.

  • The initial validation requires ambiente, chave, manifestador and evento.
  • motivo_rejeicao is required only with evento = 2.
  • justificativa_rejeicao is required whenever motivo_rejeicao = 9, even if you send that reason with evento = 1.
  • When you send the rejection fields in other cases, they still must follow the values and limits in the table.

Even on a confirmation, the current processing still reads both rejection fields, and it has not been confirmed that the request succeeds when either of them is left out. Errors in the initial validation return HTTP 200 with the error field. Passing the validation or getting HTTP 200 does not prove that the tax event was recorded: check the response body and the final result.

Parameter NFS-e Type Size Description
ambiente
number or string 1 Environment where the NFS-e was issued. Accepts the values below as a number or a numeric string. 1 - Production
2 - Sandbox
chave
string 50 National access key of the NFS-e you acknowledge. This field does not accept a UUID.
manifestador
number or string 1 Role of the party that acknowledges the NFS-e. Accepts the values below as a number or a numeric string.
1 - Service buyer
2 - Intermediary
evento
number or string 1 Type of acknowledgment event. Accepts the values below as a number or a numeric string.
1 - Confirmation
2 - Rejection
motivo_rejeicao
number or string 1 Reason for rejecting participation in the NFS-e.
Required only when evento = 2 (rejection). When sent with any event, it accepts only the values below, as a number or a numeric string.
1 - Duplicate NFS-e
2 - NFS-e already issued by the service buyer
3 - The taxable event did not occur
4 - Error in the tax liability
5 - Error in the service amount, the deduction amount, the service provided or the date of the taxable event
9 - Other
justificativa_rejeicao
string 15-255 Justification for rejecting participation in the NFS-e.
Required when motivo_rejeicao = 9 (Other), even if you send that reason with evento = 1. In other cases it is optional. When sent, it must have 15 to 255 characters.

Example confirmation request by the service buyer, in the sandbox (test environment): manifestador: 1 identifies the service buyer, and evento: 1 requests the confirmation. The validation accepts the request without the rejection fields. Replace the key and the token with those of your integration.

curl -X PUT \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
   "ambiente": 2,
   "chave": "00000000000000000000000000000000000000000000000000",
   "manifestador": 1,
   "evento": 1
}' \
https://api.webmania.com.br/2/nfse/manifestar

Example HTTP 200 response for an approved acknowledgment. It does not prove that the request above, without the rejection fields, was processed successfully. Check the actual result returned by the API:

{
  "uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
  "modelo": "manifestacao_nfse",
  "status": "aprovado",
  "motivo": "Manifestação aprovada com sucesso.",
  "chave": "00000000000000000000000000000000000000000000000000",
  "xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
  "log": {...} // Response log
}

Contingency mode and processing

The service invoice can be issued synchronously or asynchronously, depending on the city provider. A batch with several RPS can also be processed synchronously when the provider offers that mode. The nfse or lote_rps model does not guarantee immediate authorization.

Webmania® detects automatically when the provider has not returned the result yet or is offline. It follows the invoice until the result, and your application does not need to send anything again:

SituationStatusWhat Webmania does
The provider received the invoice, but processes it asynchronously or has not returned the result yetprocessandoChecks with the provider at increasing intervals until it gets the result.
Communication with the provider failed during sendingprocessandoTries to send it again automatically.
The provider is still offline after the first attemptscontingenciaKeeps the invoice in contingency mode and keeps trying automatically until the provider responds.
From request to final result: NFS-e When it receives the POST /2/nfse/emissao, Webmania sends the invoice to the provider of the city. When the provider answers right away, the response returns aprovado or reprovado. When the provider works asynchronously, or has not given the result yet, the invoice gets the processando status and Webmania checks the provider at increasing intervals. If the provider is unavailable, the invoice gets the contingencia status and Webmania tries again automatically. The url_notificacao receives the issuing response and then the final result, aprovado or reprovado, which is also available in the lookup. POST /2/nfse/emissao Sent to the city's provider synchronous or asynchronous, per provider Immediate response aprovado reprovado Processing processando Provider unavailable contingencia Webmania checks the provider at increasing intervals Automatic retry until the provider responds Final result in your application aprovado or reprovado, in the url_notificacao and the lookup synchronous provider result pending communication failure
Webmania® step Final result Waiting for the result: not a final status Your application
Synchronous or asynchronous mode depends on the provider of the city. While the status is processando or contingencia, follow the invoice through the lookup or the notification, without resending the same request.

The final result, aprovado or reprovado, arrives by notification and is available in the lookup. While the status is processando or contingencia, wait for the result before you send the same request again.

Infrastructure

The Webmania® API runs on Amazon AWS, the global leader in cloud computing, in the us-east-1 region (US East), with a point of presence in sa-east-1 (São Paulo). The entry point is anycast and highly available: from anywhere in the world, your request goes to the server closest to you.

Anycast entry of the Webmania API around the world World map with the us-east-1 region, in the eastern United States, and the sa-east-1 point of presence, in São Paulo. Requests from many parts of the world enter through the anycast network and go to the nearest server: North America, Europe and Asia to us-east-1, and South America, Africa and Oceania to sa-east-1. us-east-1 US East sa-east-1 São Paulo
Webmania AWS region Your application Anycast route to the nearest server
Illustration. The dots stand for applications in different regions of the world, not for real server addresses.

Global anycast

The same entry IPs serve the whole world. Your request goes to the server closest to you, with no setup on your side.

Two AWS locations

us-east-1 (US East) and sa-east-1 (São Paulo). Keep your infrastructure close to one of them for a shorter response time.

Static IPs

Fixed IPs for inbound and outbound traffic: allow them in your firewall and check the source of the notifications you receive.

Static inbound IPs Requests from your application to the API.
  • 13.248.145.90
  • 76.223.17.240
Static outbound IPs Notifications sent by Webmania® to your URL.
  • 34.196.69.38
  • 44.219.142.86

Request limits

The Webmania® API limits the number of requests per second to keep every integration stable and fast. Each limit is counted per second, separately for each HTTP method and each endpoint.

GET 15per second

Reading: lookups and lists.

POST No limit

Creating: issuing and other submissions. See the specific limits below.

PUT / DELETE 5per second

Changing and removing resources.

Specific limits

Some endpoints have a lower limit, which applies instead of the method's limit:

Request Limit Reason
Issuing in the sandbox (homologação) 1 request per second Test environment for your integration.

Need a higher request volume? Contact us and we will review it.

When the limit is exceeded

A request over the limit is refused with HTTP 429 (Too Many Requests) before it is processed. Nothing is issued, changed or canceled, and you can safely resend the same request.

Header Example Description
Retry-After 1 Seconds to wait before you resend the request. If the response does not include this header, wait 1 second.

Example of an HTTP 429 response. The API sends the message in Portuguese; it means “Request limit reached. Try again in a few seconds.”:

{
  "error": "Limite de requisições atingido. Tente novamente em alguns segundos."
}
Detect the limit by the HTTP status 429, not by the text of the error field: the message can change from one endpoint to another.

How to handle HTTP 429

  1. Pause sendingStop sending new requests to the same endpoint.
  2. Wait the time shownWait the number of seconds in the Retry-After header, or 1 second if the header is missing.
  3. Resend the same requestThe refused request was not processed. Resend it with the same content.
  4. Wait longer if the 429 repeatsFor each new 429 in a row, double the wait time (1, 2, 4, 8 seconds) and set a maximum number of retries.

Best practices

Use the notification URL

Receive the API results at your notification URL instead of polling in a loop. When a result arrives, update your database and download the PDF and the XML.

Send through a queue

Spread your requests through a queue that respects the per-second limit of each method, instead of sending everything at once.

Send valid credentials

The endpoints require valid access credentials in the request header. Sending them incorrectly is treated as misuse of the API.

Allow your server IP

By default, the firewall blocks servers in regions with a high rate of attacks or a poor reputation. If a GET to https://webmania.com.br/api/ or https://api.webmania.com.br returns 403 Forbidden by mistake, contact us and we will allow your IP.

Changelog

  1. v3.3.1 · November 27, 2026 · Documentation · Changed

    Foreign trade in the national standard (Padrão Nacional): valor_servico_moeda is back in the documentation, required in production until December 7, 2026. The main example now works in production and in the sandbox; the example with DU-E, commercial invoice and foreign exchange contract is now separate.

    Changed sections: provedores-padrao-nacional-comercio-exterior, mudancas-nfse-padrao-nacional

  2. v3.3.0 · November 26, 2026 · API · Changed

    Foreign trade (DUIMP, DU-E, commercial invoice, foreign exchange contract and service mode 5) and the city of the event now apply in the national standard: already in the sandbox, and in production from December 7, 2026, the new date of all the provider's changes. valor_servico_moeda, numero_di and numero_re are removed from the documentation.

    Changed sections: mudancas-nfse-padrao-nacional, provedores-padrao-nacional-comercio-exterior, informacoes-atividades-eventos

  3. v3.2.0 · November 24, 2026 · API · Added

    Documented the upcoming changes to the São Paulo NFS-e, not released yet: tax base adjustment, foreign trade, donation, credit reversal, linked payments and country of the service result, with the same parameters as the national standard.

    Changed section: mudancas-nfse-sao-paulo-rtc

  4. v3.1.5 · November 18, 2026 · Documentation · Changed

    The nfses_referenciadas parameter now states that it is required in the national standard when tipo_operacao is 2 or 3, and the description of tipo_operacao mentions this requirement.

    Changed section: reforma-tributaria-nfse

  5. v3.1.4 · November 17, 2026 · Documentation · Changed

    The processing section now has a flowchart from the request to the final result, and it explains the contingencia status when the provider is unavailable.

    Changed section: processamento

  6. v3.1.3 · November 9, 2026 · Documentation · Added

    The documentation is now LLM-ready: copy the page or each section as Markdown, a section index and llms.txt.

Solutions

Fiscal IssuerFiscal MonitorTax ReconciliationArtificial Intelligence

Industries

Logistics & TransportationTechnology & SaaSManufacturingBanks & FintechsServices & SubscriptionsRetail & CommerceMid-sized CompaniesEnterprise

Brazil tax guide

Start hereComplete guideGlossaryNF‑e (electronic invoice)NFS‑e (service invoice)CT‑e (freight bill)Tax reform

Company

AboutCustomersContactBook a demoPolicies and termsTrust Center

Developers

API documentationNF‑e and NFC‑e APINFS‑e APICT‑e and CT‑e OS APIDC‑e APIMDF‑e APINFCom APICIOT / PEF APITax payment slips APIFiscal Monitor APIB2B Management APISDKs on GitHubDocs for LLMs (llms.txt)

Offices

United States

Webmania Inc8 The Green, STE R, Dover, DE 19901

São Paulo, Brazil

Cubo Itaú innovation hubAlameda Vicente Pinzon, 54 - 10th floor, Vila Olímpia, São Paulo - SP

Curitiba, Brazil

HeadquartersAv. Água Verde, 1413 - 5th floor, Água Verde, Curitiba - PR

HOTMILK innovation hubR. Imac. Conceição, 1430, Prado Velho, Curitiba - PR

Talk to our team

Quick access

Customer panelContact
Webmania® Status SEFAZ Monitor City Hall Monitor
Cubo Itaú Startup 2025
webmania®

Copyright © 2009-2026 Webmania®.Webmania® is a registered trademark used exclusively by WMBR SERVICOS EMPRESARIAIS LTDA
CNPJ 11.290.027/0001-82, headquartered at Av. Água Verde, 1413, 5th floor - Curitiba, PR, Brazil - ZIP 80620-200

Region and language

Brazil

  • PTPortuguês (Brasil)
  • ENEnglish
  • ESEspañol
We use cookies to improve your experience on Webmania®. Learn more in our Privacy Policy and Cookie Policy.