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 →
  • NFCom REST API
  • Quick guide
    • NFCom lifecycle
  • SDKs & LLMs
    • LLM-ready
    • Webmania SDKs
    • Examples
  • Authentication
  • Notifications
    • Notification fields
    • Notification example
  • Issuing an NFCom
    • Which NFCom to issue
    • General information
      • Special behaviors
    • Subscriber
      • Contract
      • Main terminal
    • Customer
    • Items
    • Tax Class
    • Taxes
      • Classification code
      • ICMS
      • PIS/COFINS
      • FUST/FUNTTEL
    • Prepayment
    • Billing
    • Optional information
      • Authorize download
      • Special indicators
      • NFCom replacement
      • Co-billing
      • Inbound invoice
    • Replacement NFCom
    • Adjustment NFCom
    • Classification codes
      • 010 - Subscription
      • 020 - Activation
      • 030 - Metered service
      • 040 - Unmetered service
      • 045 - Bundled services
      • 050 - Prepaid service
      • 060 - Other services
      • 070 - Network resource assignment
      • 080 - Equipment provision
      • 100 - Own billing
      • 590 - Deductions
      • 120 - Centralized billing
      • 130 - Co-billing
  • Tax reform
    • IBS/CBS
    • IBS/CBS — Simples Nacional
    • State IBS
    • City IBS
    • CBS
    • Zero CBS rate — ZFM/ALC
    • Credit reversal
  • Functions
    • Download XML and PDF
      • Access credentials
      • Token
    • Look up an NFCom
    • Cancel an NFCom
    • Service status
  • Contingency mode
  • Infrastructure
  • Request limits
  • Changelog
⚡ Follow in real time (in Portuguese): Status | SEFAZ Monitor | City Hall Monitor

Last updated: December 3, 2026 · v2.1.0

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

Telecom Invoice (NFCom) REST API

Documentation for issuing the Brazilian telecom invoice (NFCom), model 62

NFCom for internet providers and telecom companies NFCom for internet providers and telecom companies

The Webmania® REST API issues the NFCom at SEFAZ, the state tax authority. It generates the XML file and the DANFECOM (the printed summary of the NFCom), sends you the result by notification, and lets you look up and cancel each invoice. To start, read the Quick guide. To issue other document types, see all the APIs.

What is the NFCom? The NFCom, model 62, is the telecom invoice: the Brazilian electronic tax document for telecommunication services:

Who issues it

Telecommunication service providers, such as landline and mobile telephone, broadband internet, pay TV, data communication and multimedia services. See General information.

Customer and subscriber

The NFCom identifies the customer who pays for the service (the tomador) in the cliente object and the subscriber in the assinante object. The subscriber contract is required for normal billing and centralized billing (tipo_faturamento 0 and 1). It is optional for co-billing (2), when another operator bills the service.

What Webmania generates

The XML and the DANFECOM, which prints on common printers. Webmania also sends the NFCom by email.

Brazilian tax terms you will see. They keep their Brazilian names in the payload and on the NFCom:
SEFAZ: the state tax authority. It authorizes each NFCom and answers with a status code; 100 = authorized.
ICMS: the state tax on communication services, tax base × rate on each item. Group icms of impostos; its CST (tax status code) goes in situacao_tributaria.
CFOP: the 4-digit code that says what kind of transaction it is, for example 5307 = communication service inside the state. Field codigo_cfop.
PIS / COFINS: federal contributions on revenue, each with its own CST. Groups pis and cofins.
FUST / FUNTTEL: federal telecom funds. Groups fust and funttel of impostos.
IBS / CBS / cClassTrib: the new taxes of the tax reform and the code that says how they apply. Group ibs_cbs; see Tax reform.
CNPJ / CPF / IE: the company ID (14 digits), the individual taxpayer ID (11 digits) and the state registration of the customer.
Every term in plain English: glossary of Brazilian tax terms.

Availability and security
High availability, scalable and redundant servers at the highest PCI DSS security level, on Amazon Web Services, the global cloud computing leader.
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, using JSON. Low latency, with more than 200 points of presence on the Amazon Web Services network.
Automatic numbering
Issue NFCom through the API and the Webmania® Panel at the same time. Webmania manages and audits all numbering automatically.
DANFECOM and email delivery
Automatic DANFECOM that works with all common printers, and secure delivery of the NFCom by email.
Expert support
Expert help with tax integration and programming.

Quick guide

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

URL HTTP Verb Function
/2/nfcom/emissao POST Issue an NFCom or generate a preview (finalidade 1-4)
/2/nfcom/cancelar PUT Cancel an NFCom
/2/nfcom/consulta/{identifier} GET Look up an NFCom by UUID or access key
/2/nfcom/status GET SEFAZ service status
/xmlnfcom/{uuid|chave} GET Download the XML of the issued NFCom or of the preview
/danfecom/{uuid|chave} GET Download the DANFECOM

Issuing, lookup, cancellation and status respond in JSON. The XML and DANFECOM downloads return the file itself. Send Authorization: Bearer YOUR_ACCESS_TOKEN in every call, and Content-Type: application/json in calls that have a body. See Authentication.

HTTP 200 does not mean authorized. An HTTP 2xx status means the API processed the request. It does not guarantee that the NFCom was authorized: check the status field in the issuing or lookup response. If something fails, read the response body, even with HTTP 200. Errors can come in the error field, as in this authentication error with HTTP 401 ("restricted access, token missing or invalid"; API messages are in Portuguese):
{
  "error": "Acesso restrito. Token não informado ou inválido."
}

How to integrate the NFCom:

  1. Get the Access Token Copy the API 2.0 Access Token from the Webmania® Panel and send it in the Authorization header.
  2. Set the taxes In classe_imposto, send the reference of a communication Tax Class registered in the panel, or send the taxes of each item in the impostos object.
  3. Choose the purpose A normal NFCom (finalidade = 1) or a replacement NFCom, with the substituicao object.
  4. Check the previewif needed With previa_danfecom = true, the API only generates a preview of the DANFECOM and does not issue the NFCom. The response returns only the danfecom URL.
  5. Issue the NFCom POST to /2/nfcom/emissao, with ambiente = 2 (sandbox) for tests. The response returns the uuid and the status of the NFCom. Store the uuid in your system.
  6. Receive the result When you send url_notificacao in the request, Webmania notifies you when the NFCom is authorized, rejected or issued in contingency mode.
  7. Download the XML and the DANFECOM Use the xml and danfecom URLs from the response, the lookup or the notification.
  8. Look up the NFComif needed By UUID or access key, to check the status at any time.
  9. Cancel the NFComif needed To void an authorized NFCom, send the access key and a reason.

Quick guide
NFCom lifecycle

Every NFCom gets a uuid when the document is created, before it is sent to SEFAZ (state tax authority). From then on, it goes through the statuses below. They appear in the response, in the lookup and in the notifications:

NFCom lifecycle The NFCom is created with the status processando and, in the same request, sent to SEFAZ (state tax authority). When SEFAZ is available, the response returns aprovado, with the XML and the DANFECOM, or reprovado, with the reason. When SEFAZ is unavailable, the NFCom is issued in offline contingency mode (tpEmis=2), with the status contingencia, and Webmania reprocesses it automatically until the result is aprovado or reprovado. If SEFAZ still gives no conclusive answer after 21 attempts, the NFCom stays in contingency mode for manual reconciliation. An authorized NFCom can be canceled with PUT /2/nfcom/cancelar and then becomes cancelado. POST /2/nfcom/emissao Processing processando waiting for SEFAZ Authorized aprovado XML and DANFECOM Rejected reprovado read the reason and fix it Offline contingency contingencia issued with tpEmis=2 Canceled cancelado PUT /2/nfcom/cancelar SEFAZ unavailable automatic reprocessing
After authorization Authorized Waiting for the result: status not final Rejected Automatic reprocessing
An NFCom in contingencia already has its XML and DANFECOM and can be printed. Follow the same uuid with the lookup or the notification, without issuing it again.
StatusWhat it meansWhat to do
processandoThe NFCom was created and SEFAZ has not given the result yet.Webmania checks SEFAZ automatically. Wait for the notification or look up the NFCom. Do not issue it again.
contingenciaSEFAZ was unavailable: the NFCom was issued in offline contingency mode (tpEmis=2) and already has its XML and DANFECOM.The NFCom can be printed. Webmania sends it again automatically: follow the same uuid and do not issue it again. See Contingency mode.
aprovadoSEFAZ authorized the NFCom. The protocolo, the XML and the DANFECOM are available.Download the XML and the DANFECOM. To void the NFCom, cancel it.
reprovadoSEFAZ or the API validation rejected the NFCom. motivo gives the reason.Fix the data shown in motivo and issue a new NFCom.
canceladoSEFAZ approved the cancellation.Store the xml_cancelamento.

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

Examples

Test the NFCom 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 an HTTP header. Use the Authorization header in this format:

Authorization: Bearer {Access-Token}

You find the API 2.0 Access-Token in the Webmania® Panel. Include it in every request.

In requests with a body, send JSON with the Content-Type: application/json header. In operations that return JSON, also send Accept: application/json. GET lookups have no body.

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

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

Notifications

To keep your platform up to date, Webmania® sends automatic notifications with the result of the NFCom. With them, you do not need a routine of periodic lookups: wait for the webhook and update the NFCom in your system when it arrives.

The notification is sent by POST, in JSON, to the URL you sent in url_notificacao when issuing. Without this parameter, the NFCom is not notified.

Notified statusWhen it is sent
aprovadoSEFAZ authorized the NFCom, when it was issued or when it was reprocessed after contingency mode. The body includes the chave, the protocolo, the xml and the danfecom.
reprovadoSEFAZ rejected the NFCom, when it was issued or when it was reprocessed after contingency mode. The body includes the motivo.
contingenciaThe NFCom was issued in offline contingency mode. The body includes contingencia = true, the xml and the danfecom. The final result arrives in a new notification.
canceladoWebmania found the cancellation when it checked the NFCom at SEFAZ. A cancellation made with PUT /2/nfcom/cancelar returns the result in the response itself.
When there is no notification. The result of PUT /2/nfcom/cancelar comes in the response of the request itself, without a notification. Requests rejected before the document is created, and some early responses, may also produce no notification. Check the result in the issuing response or with the lookup, without issuing the NFCom again.

What is the UUID? The UUID (Universally Unique Identifier) is a unique identifier of 36 characters, in the 8-4-4-4-12 format, that Webmania assigns to each NFCom.

The UUID is generated when a new tax document is created, before it is sent to SEFAZ. A request rejected before that point can return an error without a UUID. Once a document exists, its UUID identifies it whatever the tax result.

The UUID identifies the same document during reprocessing and contingency mode. A new issuing request can create another document with another UUID. The access key is a different field and can change. That is why the UUID, not the access key, should be your reference in the database.

Notifications
Notification fields

The notification body has the same format as the issuing response:

Parameter Type Description
uuid string Unique identifier of the NFCom
Use the UUID to match the notification you receive.
chave string Access key of the NFCom at SEFAZ
serie number Issuing series
nfcom number NFCom number
Managed automatically by the issuer.
status string NFCom status
Examples: aprovado
reprovado
cancelado
processando
contingencia
See the lifecycle.
motivo string Reason for the status
May be omitted when the NFCom is authorized and no reason is recorded.
modelo string Returned model
Fixed value: nfcom
xml string URL of the NFCom XML
xml_cancelamento string or null URL of the XML of the canceled NFCom
Returns null when the status is not cancelado.
danfecom string URL of the DANFECOM
log object or array SEFAZ response or details of the XML validation
Can return an object with the available data or an empty array.
protocolo string Authorization protocol
Included when the status is aprovado and an authorization protocol is recorded.
contingencia boolean Whether the NFCom is in contingency mode

Notifications
Notification example

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

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

Example notification for an authorized NFCom:

{
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "chave": "35240712345678901234620010000001191234567890",
    "serie": 1,
    "nfcom": 119,
    "status": "aprovado",
    "motivo": "Autorizado o uso da NFCom",
    "modelo": "nfcom",
    "contingencia": false,
    "xml": "https://api.webmaniabr.com/xmlnfcom/550e8400-e29b-41d4-a716-446655440000",
    "xml_cancelamento": null,
    "danfecom": "https://api.webmaniabr.com/danfecom/550e8400-e29b-41d4-a716-446655440000",
    "log": [],
    "protocolo": "135240000123456"
}

Issuing an NFCom

The issue request creates the NFCom (telecom invoice), sends it to SEFAZ (state tax authority) in the same request and returns the result in the response. When SEFAZ is unavailable, the NFCom is issued in offline contingency mode. See the Lifecycle.

To issue an NFCom, send a POST request to the URL /2/nfcom/emissao.

Which NFCom to issue

The finalidade field (purpose of the NFCom) accepts the values 1, 2, 3 and 4:

Normal NFCom

Bills a service you provided. Send finalidade = 1: the XML is generated with finNFCom = 0.

Replacement NFCom

Replaces an NFCom or references an invoice of model 21/22 (the earlier communication and telecom invoices). Send finalidade = 3 and the substituicao object, with the access key of the replaced NFCom or the referenced invoice, and the motivo (reason). See Replacement NFCom.

Adjustment NFCom

The XML has no adjustment type: finalidade 2, 3 or 4 generates finNFCom = 3, a replacement. To adjust an NFCom, issue a replacement with the substituicao object. See Adjustment NFCom.

Issue example

curl -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @nfcom.json \
  https://api.webmania.com.br/2/nfcom/emissao

Sample nfcom.json file, for illustration only. Replace the fictitious data and the tax values with the data of your transaction. The sample does not guarantee authorization by SEFAZ.

{
    "ambiente": 2,
    "natureza_operacao": "Prestação de serviços de telecomunicação",
    "tipo_operacao": 1,
    "finalidade": 1,
    "municipio_fato_gerador": "3550308",
    "consumidor_final": 1,
    "presenca_comprador": 2,
    "cliente": {
        "cnpj": "12345678000199",
        "razao_social": "Empresa Exemplo LTDA",
        "indicador_ie": 2,
        "endereco": {
            "logradouro": "Rua das Flores",
            "numero": "123",
            "bairro": "Centro",
            "codigo_municipio": "3550308",
            "municipio": "São Paulo",
            "uf": "SP",
            "cep": "01310100"
        }
    },
    "assinante": {
        "codigo": "ASS123456",
        "tipo": 3,
        "tipo_servico": 4,
        "contrato": {
            "numero": "CONT2024001",
            "data_inicio": "2024-01-01",
            "data_fim": "2024-12-31"
        }
    },
    "itens": [{
        "codigo": "SERV001",
        "codigo_classificacao": "400401",
        "descricao": "Internet Banda Larga 100MB",
        "unidade": "MES",
        "quantidade": 1,
        "valor_unitario": 99.90,
        "valor_total": 99.90,
        "indicador_total": 1,
        "impostos": {
            "icms": {
                "origem": 0,
                "situacao_tributaria": "00",
                "codigo_cfop": "5307",
                "valor_base_calculo": 99.90,
                "aliquota_icms": 18.00,
                "valor_icms": 17.98
            },
            "pis": {
                "situacao_tributaria": "01",
                "valor_base_calculo": 99.90,
                "aliquota": 0.65,
                "valor": 0.65
            },
            "cofins": {
                "situacao_tributaria": "01",
                "valor_base_calculo": 99.90,
                "aliquota": 3.00,
                "valor": 3.00
            }
        }
    }],
    "url_notificacao": "https://exemplo.com/webhook"
}

Sample HTTP 200 response for an authorized NFCom. Once the document is created, the fields are the ones listed in Notification fields:

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "chave": "35240712345678901234620010000001191234567890",
  "modelo": "nfcom",
  "serie": 1,
  "nfcom": 119,
  "status": "aprovado",
  "motivo": "Autorizado o uso da NFCom",
  "contingencia": false,
  "protocolo": "135240000123456",
  "xml": "https://api.webmaniabr.com/xmlnfcom/550e8400-e29b-41d4-a716-446655440000",
  "xml_cancelamento": null,
  "danfecom": "https://api.webmaniabr.com/danfecom/550e8400-e29b-41d4-a716-446655440000",
  "log": []
}

Validation or processing errors may return other fields. With previa_danfecom = true, the response returns only the danfecom URL of the preview. When you send url_notificacao, the result is also sent by notification.

Issuing an NFCom
General information

The NFCom (Nota Fiscal Fatura de Serviços de Comunicação Eletrônica) is the telecom invoice. It is an electronic tax document, model 62, that records the provision of telecommunication services.

Providers of telecommunication services must issue the NFCom, for example:

  • Fixed and mobile telephony: local, long-distance and international calls, and roaming.
  • Broadband internet: internet access by fiber optic, cable, DSL, satellite or mobile technology.
  • Pay TV: TV channels delivered by cable, satellite or streaming.
  • Data communication: corporate data transmission, dedicated links and private networks.
  • Multimedia services: digital content, video/audio streaming and converged services.
  • Other telecommunication services: any other service, such as IoT, M2M, messaging and value-added services.

Fill in the fields according to the purpose of the NFCom. Issue parameters:

Parameter Required Type Size Description
ID
Optional
string Up to 100 Purchase order number or processing ID
Identifies the order in your integration. Do not assume that sending the same ID again creates a new NFCom: duplicate control by ID depends on the company settings. Learn more (in Portuguese)
ambiente
Required
integer 1 SEFAZ environment
1 - Production
2 - Sandbox (homologação)
natureza_operacao
Required
string 1-60 Nature of the transaction (a short text that describes it)
tipo_operacao
Required
integer 1 Type of transaction
0 - Inbound
1 - Outbound
finalidade
Required
integer 1 Purpose of the NFCom
Values accepted by the API: 1 - Normal; 2, 3 or 4 - Mapped to replacement in the XML.
The XML uses finNFCom = 0 for finalidade 1 and finNFCom = 3 for the other values. These values do not create separate complement, adjustment or return types.
consumidor_final
Optional
integer 1 Whether the customer is a final consumer
0 - No
1 - Yes (default)
presenca_comprador
Optional
integer 1 How the buyer was present
1 - In person
2 - Internet (default)
3 - Telephone service
4 - NFC-e home delivery
9 - Other
processo_emissao
Optional
integer 1 Issue process
0 - Taxpayer application (default)
3 - Tax authority application
origem
Optional
string Up to 100 Identifies where the issue request came from. It is stored with the request data
url_notificacao
Optional
string Up to 500 Valid URL that receives notifications about the processing and status updates of the NFCom. A notification for every step, or an early response, is not guaranteed
municipio_fato_gerador
Optional
string 7 IBGE code of the city where the taxable event takes place
Default: the city code of the customer when not sent
indicador_pre_pago
Optional
integer 1 Whether the service is prepaid
1 - Prepaid service
When it does not apply, omit the field. The value 0 is not accepted.
indicador_cessao_meios_rede
Optional
integer 1 Whether network resources are assigned to another provider
1 - Network resource assignment
When it does not apply, omit the field. The value 0 is not accepted.
Note: When = 1, the Fatura (bill) group is not generated in the XML. If you send fatura, its fields are still validated.
indicador_nota_entrada
Optional
integer 1 Whether it is an inbound invoice
1 - Inbound invoice
When it does not apply, omit the field. The value 0 is not accepted.
tipo_faturamento
Optional
integer 1 Billing type
0 - Normal billing (default)
1 - Centralized billing
2 - Co-billing (cofaturamento)
Important: For tipo_faturamento 0 or 1, the subscriber contract is required
previa_danfecom
Optional
boolean - - - Generate only a preview of the DANFECOM (printed NFCom summary), without issuing
true - Generates only a preview
false - Issues the NFCom (default)
assinante
Required as described in the note
object - - - Information about the subscriber of the service (the contract is required when tipo_faturamento = 0 or 1)
cliente
Required
object - - - Data of the customer (the tomador)
itens
Required
array 1-990 items Array with the services provided
fatura
Optional
object - - - Billing and collection data
autorizar_download
Optional
array - - - CPF (11-digit individual taxpayer ID) or CNPJ (14-digit company ID) numbers allowed to download the XML
Array with up to 10 CPFs/CNPJs
informacoes_complementares
Optional
string Up to 5000 Additional information of interest to the taxpayer
emitente.inscricao_suframa
Optional
string 8-9 Registration of the issuer with SUFRAMA (the agency of the Manaus Free Trade Zone)
Send it when the issuer is registered in a tax incentive area. Accepts the formatted value (1.2.3.456789) or digits only.
data_emissao
Optional
string - - - Date and time the document is issued
Accepted formats: YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS±HH:MM or YYYY-MM-DD HH:MM:SS. When omitted, the API uses the processing date and time. The date must be between 120 hours before processing, minus the safety margin (10 minutes by default), and 5 minutes after processing (clock tolerance).

Issuing an NFCom
Special behaviors

The NFCom supports indicators that are specific to the telecommunications sector. The details of each one are in Special indicators:

IndicatorFieldWhen to use
Prepaidindicador_pre_pago = 1Prepaid service (depends on the classification code).
Network resource assignmentindicador_cessao_meios_rede = 1Sharing of network infrastructure.
Inbound invoiceindicador_nota_entrada = 1Inbound invoice, when it applies.

Issuing an NFCom
Subscriber

Send the information about the subscriber of the service in the assinante object.

Parameter Required Type Size Description
codigo
Optional
string 1-60 Subscriber code
Unique ID of the subscriber in the provider's system (if missing, the CPF/CNPJ of the customer is used)
tipo
Optional
integer 1-2 Subscriber type
1 - Commercial
2 - Industrial
3 - Residential/Individual (default)
4 - Rural producer
5 - Public body
6 - Other
Input validation accepts integers from 1 to 99. Tax acceptance depends on the SEFAZ rules.
tipo_servico
Optional
integer 1 How the service is used
1 - Telephony
2 - Data communication
3 - Pay TV
4 - Internet access (default)
5 - Multimedia
6 - Other
contrato
Required for normal or centralized billing
object - - - Contract data
Required when tipo_faturamento = 0 or 1
terminal_principal
Optional
object - - - Data of the main terminal of the contracted service
Used to calculate IBS and CBS, to define the destination of the tax

Issuing an NFCom
Contract

When tipo_faturamento is 0 (Normal) or 1 (Centralized), you must send the contract data in the assinante.contrato object:

Parameter Required Type Size Description
numero
Required for normal or centralized billing
string 1-60 Contract number
Required for tipo_faturamento 0 or 1. Example: 12345/2025
data_inicio
Required for normal or centralized billing
string 10 Contract start date
Required for tipo_faturamento 0 or 1. Format: YYYY-MM-DD
data_fim
Required for normal or centralized billing
string 10 Contract end date
Required for tipo_faturamento 0 or 1. Format: YYYY-MM-DD; equal to or later than data_inicio

Sample excerpt of a subscriber with a contract, for illustration only. Add the other required fields of the issue request; this excerpt is not a complete request:

{

    "tipo_faturamento": 0,
    "assinante": {
        "codigo": "ASS123456",
        "tipo": 3,
        "tipo_servico": 4,
        "contrato": {
            "numero": "12345/2025",
            "data_inicio": "2025-01-01",
            "data_fim": "2025-12-31"
        }
    }

}
Important: The assinante.contrato object and its three fields are required when tipo_faturamento = 0 (Normal) or 1 (Centralized). This also applies when tipo_faturamento is omitted (default 0). For co-billing (tipo_faturamento = 2), the contract is optional. If you send it, its fields are validated and the data you send goes into the XML.

Issuing an NFCom
Main terminal

Send the main terminal of the contracted service in the optional assinante.terminal_principal object. The city of the terminal is used to calculate IBS and CBS, to define the destination of the tax. For corporate, family or similar phone plans, send the number of the main phone line of the plan.

Parameter Required Type Size Description
numero
Required
string 7-12 Number of the main terminal
Digits only, from 7 to 12 digits. Example: 48987654321
uf
Required
string 2 State where the terminal is activated
State abbreviation. Must be the same state as the issuer. Example: SC
codigo_municipio
Optional
string 7 IBGE code of the city of the terminal
The city must exist and belong to the state you send. Example: 4205407

Main terminal example:

{
    ...
    "assinante": {
        "codigo": "ASS123456",
        "tipo": 3,
        "tipo_servico": 1,
        "terminal_principal": {
            "numero": "48987654321",
            "uf": "SC",
            "codigo_municipio": "4205407"
        }
    },
    ...
}
Important: Available in the sandbox and, in production, for invoices issued from December 14, 2026. Before that date the object is accepted, but it is not sent in the invoice. Send the values as text (in quotes), including the terminal number.

Issuing an NFCom
Customer

Send the data of the customer (the tomador) in the cliente object, following the rules below.

Parameter Required Type Size Description
cnpj
Required for a company
string 14 CNPJ (company ID)
cpf
Required for an individual
string 11 CPF number (individual taxpayer ID)
razao_social
Required when you send a CNPJ
string 2-60 Legal company name (company)
Do not use it with a CPF: in that case, use nome_completo.
nome_completo
Required when you send a CPF
string 2-60 Full name (individual)
Do not use it with a CNPJ: in that case, use razao_social.
indicador_ie
Required for a CNPJ
integer 1 IE (Inscrição Estadual, state registration) indicator
1 - ICMS taxpayer
2 - Exempt taxpayer
9 - Non-taxpayer (default for CPF)
inscricao_estadual
Required when indicador_ie = 1
string 2-14 IE number: the state registration of a company that pays ICMS
Required for an ICMS taxpayer (indicador_ie = 1). It goes into the XML only in that case.
inscricao_municipal
Optional
string 1-15 IM (Inscrição Municipal, city registration) number
email
Optional
string/array - - - Email address
Can be a string or an array of strings for several email addresses
endereco
Required
object - - - Address of the customer

Customer address

Parameter Required Type Size Description
logradouro
Required
string 2-60 Street of the address
numero
Required
string 1-60 Street number
complemento
Optional
string 1-60 Address line 2 (suite, apartment, etc.)
bairro
Required
string 2-60 Neighborhood
codigo_municipio
Required
string 7 IBGE city code
Send 9999999 for transactions with a foreign country.
municipio
Required
string 2-60 City name
Send 'EXTERIOR' for transactions with a foreign country.
uf
Required
string 2 State abbreviation
Send 'EX' for transactions with a foreign country.
cep
Required
string 8 Postal code (CEP) of the address
Required (use 00000000 for a foreign address when it applies)
pais
Optional
string 2-60 Country name
Default: Brasil
codigo_pais
Optional
string 4 Country code (BACEN, the Brazilian Central Bank table), digits only
Default: 1058 (Brazil)
telefone
Optional
string 6-14 Phone number, digits only
The input accepts 6 to 14 digits. The phone goes into the XML only if it ends up with 10 or 11 digits (area code + number). The country code 55 is removed first when an input has more than 11 digits.

Sample cliente object with fictitious data, for illustration only. Combine this JSON excerpt with the other required fields of the issue request:

{
    "cliente": {
        "cpf": "12345678909",
        "nome_completo": "João da Silva",
        "indicador_ie": 9,
        "email": ["joao@email.com", "joao.silva@email.com"],
        "endereco": {
            "logradouro": "Avenida Paulista",
            "numero": "1000",
            "complemento": "Apto 501",
            "bairro": "Bela Vista",
            "codigo_municipio": "3550308",
            "municipio": "São Paulo",
            "uf": "SP",
            "cep": "01310100",
            "telefone": "1133334444"
        }
    }
}

Issuing an NFCom
Items

Send the services provided and the related goods or products in the itens array. Each element is one service or product.

The net value of each item and the net total of the invoice are generated automatically in the XML. They are calculated from the total value and the quantity you send. This applies in the sandbox and, in production, to invoices issued from December 14, 2026. You do not need to send any parameter for this. The net values are not generated for the whole invoice when any item has indicador_total equal to 0, is a return item or uses a deduction classification code (starting with 5).

Parameter Required Type Size Description
codigo
Optional
string 1-60 Item/service code
codigo_classificacao
Required as described in the note
string 6-7 Classification code of the item
Required here, or in impostos.codigo_classificacao, or through classe_imposto
descricao
Required
string 1-120 Item/service description
unidade
Required
string 1-6 Unit of measure
Accepts values such as MIN, MB, GB, UN, MES. They are converted to the code the NFCom requires
quantidade
Required
number 0.0001 to 99999999999.9999 Item quantity
Numeric value within the range shown. When the XML is generated, the quantity is formatted with 4 decimal places.
valor_unitario
Required
number 0 to 99999999999.99 Unit value of the item
valor_total
Required
number 0 to 99999999999.99 Total value of the item
indicador_total
Required
integer 1 Whether the item counts in the NFCom total
0 - Does not count in the total
1 - Counts in the total
valor_desconto
Optional
decimal 15v2 Discount value
outras_despesas
Optional
decimal 15v2 Other ancillary expenses
classe_imposto
Optional
string - - - Automatic tax setup: send the reference of the Tax Class registered in the Webmania® Panel
Format: REF followed by one or more digits (e.g. REF000000000). Use the reference of a communication class registered for the company.
impostos
Required as described in the note
object - - - Taxes set in the API, for specific transactions such as FUNTTEL and FUST (federal telecom funds), or when you need more flexibility
Required when you do not use a classe_imposto. In that case, send at least one of the icms, pis or cofins groups. Sending only fust and/or funttel does not pass validation.
cnpj_cobranca_terceiro
Required as described in the note
string 14 CNPJ of the third party that bills the item
When NT 2026.002 is in force for the issue date, it is required for items with an explicit classification code of group 110 - Third-party billing. Before that date, the field is not included in the XML.

Sample item/service, for illustration only. Combine this JSON excerpt with the other required fields of the issue request. The tax values are not tax advice:

{
    "itens": [
        {
            "codigo": "SERV001",
            "codigo_classificacao": "400401",
            "descricao": "Internet Banda Larga 100MB",
            "unidade": "MES",
            "quantidade": 1,
            "valor_unitario": 99.90,
            "valor_total": 99.90,
            "indicador_total": 1,
            "impostos": {
                "icms": {
                    "origem": 0,
                    "situacao_tributaria": "00",
                    "codigo_cfop": "5307",
                    "valor_base_calculo": 99.90,
                    "aliquota_icms": 18.00,
                    "valor_icms": 17.98
                },
                "pis": {
                    "situacao_tributaria": "01",
                    "valor_base_calculo": 99.90,
                    "aliquota": 0.65,
                    "valor": 0.65
                },
                "cofins": {
                    "situacao_tributaria": "01",
                    "valor_base_calculo": 99.90,
                    "aliquota": 3.00,
                    "valor": 3.00
                }
            }
        }
    ]
}

Issuing an NFCom
Tax Class

There are two ways to set the taxes of the NFCom: with a Tax Class or directly in the API.

The Tax Class groups the tax settings of the classification code, ICMS, PIS, COFINS, FUST and FUNTTEL, so the taxes are calculated automatically. You set it up once, and it speeds up every later issue.

In classe_imposto, send the reference of a communication class registered for the company, in the format REF followed by digits. The reference does not replace the other required fields of the item, such as valor_total and indicador_total. Sample JSON excerpt, for illustration only. Replace the references with your registered classes before you integrate:

{
    "itens": [
        {
            "descricao": "Plano Internet Fibra 200MB",
            "unidade": "GB",
            "quantidade": 1,
            "valor_unitario": 99.90,
            "valor_total": 99.90,
            "indicador_total": 1,
            "classe_imposto": "REF000000000"
        },
        {
            "descricao": "Modem hwauei fibra",
            "unidade": "un",
            "quantidade": 1,
            "valor_unitario": 280.50,
            "valor_total": 280.50,
            "indicador_total": 1,
            "classe_imposto": "REF000000000"
        }
    ]
}

To register a communication Tax Class, see Create a communication Tax Class. After you register it, the reference of the class appears in the Webmania® Panel, under the Impostos (Taxes) button.

Issuing an NFCom
Taxes

Send the tax information in the impostos object of each item. Without classe_imposto, send this object with at least one of the icms, pis or cofins groups. The NFCom supports these taxes: ICMS, the state tax on communication services, calculated on each item as tax base × rate; PIS and COFINS, federal contributions on revenue (the CBS replaces them from 2027); and FUST and FUNTTEL (federal telecom funds).

Classification code
Parameter Required Type Size Description
codigo_classificacao
Required as described in the note
string 6-7 Classification code of the item
Required here or in the item when you do not use classe_imposto. See the classification table.
ICMS
Parameter Required Type Size Description
origem
Required
integer 1 Origem (origin) of the goods: 0 = national; the other values identify imported goods or imported content
0 - Domestic
1 - Foreign - Direct import
2 - Foreign - Bought in the domestic market
3 - Domestic with more than 40% foreign content
4 - Domestic, made under basic production processes
5 - Domestic with less than 40% foreign content
6 - Foreign - Direct import with no domestic equivalent
7 - Foreign - Bought in the domestic market with no domestic equivalent
8 - Domestic with more than 70% foreign content
situacao_tributaria
Required when the icms group is sent
string 2 CST (tax status code) of ICMS: tells the tax authority how ICMS applies to the item (taxed, exempt, deferred, tax substitution…)
00, 10, 20, 30, 40, 41, 45, 50, 51, 60, 70 or 90
codigo_cfop
Optional
string 4 CFOP, the 4-digit code that says what kind of transaction it is. The first digit gives the place: 5 = inside the state, 6 = to another state
Examples:
5307 - Provision of communication service (within the state)
6307 - Provision of communication service (to another state)
valor_base_calculo
Optional
decimal 11v2 Tax base value
From 0 to 99999999999.99.
aliquota_icms
Optional
decimal 0-40 ICMS rate
When you fill in the taxes manually, the rate must be between 0% and 40%.
valor_icms
Optional
decimal 11v2 ICMS value
From 0 to 99999999999.99.
Expected ICMS on prepayment
Parameter Required Type Size Description
icms_previsto
Required as described in the note
decimal 13v2 Value of the ICMS that will apply to the future supply, for invoices billed before the service is provided.
Send it only in an invoice with tipo_pagamento_antecipado equal to 1 or 2, or in a government purchase with tipo_operacao equal to 4. Send 0 when the supply has no ICMS.
When sent, it replaces the ICMS group of the item and is deducted from the IBS and CBS tax base.
Required in these cases from February 1, 2027 in the sandbox and from March 1, 2027 in production.
PIS/COFINS
Parameter Required Type Size Description
situacao_tributaria
Required when the matching pis or cofins group is sent
string 2 CST (tax status code) of PIS or COFINS
01, 02, 03, 04, 05, 06, 07, 08, 09, 49, 50, 51, 52, 53, 54, 55, 56, 60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 98 or 99
valor_base_calculo
Optional
decimal 11v2 Tax base value
From 0 to 99999999999.99. When you fill in the taxes manually and omit it, the API uses the item total for codes 01 and 02, and zero for the others.
aliquota
Optional
decimal 0-100 Tax rate
When you fill in the taxes manually, the limit is 2.1% for PIS and 9.65% for COFINS.
valor
Optional
decimal 11v2 Calculated tax value
From 0 to 99999999999.99. When you fill in the taxes manually, the value is recalculated from the base and the rate.
FUST/FUNTTEL
Parameter Required Type Size Description
valor_base_calculo
Optional
decimal 11v2 Tax base value
From 0 to 99999999999.99.
aliquota
Optional
decimal 0-100 Rate
From 0% to 100% in input validation. When you fill in the taxes manually and omit it, the default is 1.0% for FUST and 0.5% for FUNTTEL.
valor
Optional
decimal 11v2 Tax value
From 0 to 99999999999.99.

Sample impostos object of one item, for illustration only; it is not a complete request. The values are not tax advice: fill in the other required fields and use the taxes that apply to your transaction.

{
    "impostos": {
        "codigo_classificacao": "400401",
        "icms": {
            "origem": 0,
            "situacao_tributaria": "00",
            "codigo_cfop": "5307",
            "valor_base_calculo": 99.90,
            "aliquota_icms": 18.00,
            "valor_icms": 17.98
        },
        "pis": {
            "situacao_tributaria": "01",
            "valor_base_calculo": 99.90,
            "aliquota": 0.65,
            "valor": 0.65
        },
        "cofins": {
            "situacao_tributaria": "01",
            "valor_base_calculo": 99.90,
            "aliquota": 3.00,
            "valor": 3.00
        },
        "fust": {
            "valor_base_calculo": 99.90,
            "aliquota": 1.0,
            "valor": 1.00
        },
        "funttel": {
            "valor_base_calculo": 99.90,
            "aliquota": 0.5,
            "valor": 0.50
        }
    }
}

Issuing an NFCom
Prepayment

Prepayment lets you issue an NFCom to bill a service before it is provided. Later, you issue the NFCom for the supply that uses that prepayment. The prepayment invoice states the prepayment type in tipo_pagamento_antecipado. The matching supply invoice references, item by item, the NFCom that already billed for it.

Normal invoices do not send any of these fields: leaving them out is the default behavior. These fields become available with the rollout of the tax reform, in force in all environments from August 31, 2026.

Parameter Required Type Size Description
tipo_pagamento_antecipado
Optional
integer 1 Role of the invoice in the prepayment
1 - Prepayment of a non-continuous service
2 - Prepayment of a continuous service, billed before it is provided
3 - Supply whose payment was made in advance on an earlier invoice. Send it only in prepayment invoices and in the matching supply invoice.
itens[].pagamento_antecipado
Optional
object - - - Links the item to the prepayment NFCom that already billed for it
Send it only when tipo_pagamento_antecipado is 3.
itens[].pagamento_antecipado.chave
Required as described in the note
string 44 Access key of the prepayment NFCom
Required when the pagamento_antecipado object has data. Format: 6 digits, 12 alphanumeric characters and 26 digits. The base CNPJ (company root) must match the issuer's.
itens[].pagamento_antecipado.numero_item
Optional
integer 1-990 Item number in the prepayment NFCom
Do not send it when that invoice has a single item.
itens[].pagamento_antecipado.tipo_referenciado
Optional
integer 1 Optional statement of the prepayment type of the referenced invoice
1 - Non-continuous service
2 - Continuous service

Rules:

  • With tipo_pagamento_antecipado = 1, every item of the invoice must have a classification code of a non-continuous service.
  • With tipo_pagamento_antecipado = 2, every item of the invoice must have a classification code of a continuous service.
  • With tipo_pagamento_antecipado = 3, at least one item must include pagamento_antecipado.
  • pagamento_antecipado is accepted only when tipo_pagamento_antecipado = 3.
  • An item that references a prepayment cannot use a deduction classification code (group 5, after normalization to seven digits). The deduction goes in a separate item.
  • The access key sent in pagamento_antecipado must have the same base CNPJ as the issuer of the supply invoice.
  • Use the access key of a prepayment NFCom that is authorized and still valid. SEFAZ checks the status of the referenced invoice during authorization.
  • Do not repeat the same prepayment access key in different items.

Sample excerpt of a supply invoice whose payment was made in advance on an earlier invoice, for illustration only. It is not a complete request: add the other required fields of the invoice and of the item, and replace the key of zeros with the real access key of the prepayment NFCom, with the same base CNPJ as the issuer.

{
  "tipo_pagamento_antecipado": 3,
  "itens": [
    {
      "descricao": "Serviço medido",
      "codigo_classificacao": "300101",
      "pagamento_antecipado": {
        "chave": "00000000000000000000000000000000000000000000",
        "numero_item": 1
      }
    }
  ]
}

Issuing an NFCom
Billing

Send the billing and collection information in the fatura object (the bill). With indicador_cessao_meios_rede = 1, the bill group is not generated in the XML.

Important: When you send the fatura object, every field of the group is required, except numero_debito_automatico. That field is optional (1 to 60 characters when sent) and you send it only when the bill is paid by automatic debit.
Parameter Required Type Size Description
competencia_fatura
Required when fatura is sent
string 6 Reference month of the bill
Format: YYYYMM, with year 20XX and month 01 to 12 (you can send MMYYYY, which is normalized)
data_vencimento
Required when fatura is sent
string 10 Due date
Format: YYYY-MM-DD (>= today)
data_periodo_inicial
Required when fatura is sent
string 10 Start date of the billing period
Format: YYYY-MM-DD
data_periodo_final
Required when fatura is sent
string 10 End date of the billing period
Format: YYYY-MM-DD (>= start date)
codigo_barras_fatura
Required when fatura is sent
string 1-60 Barcode of the bill
Text of 1 to 60 characters in input validation.
numero_debito_automatico
Optional
string 1-60 Automatic debit number
Text of 1 to 60 characters in input validation.

Bill periods

The current NFCom v1.00 layout does not use the bill periods group in this API. Use only the fields listed in the fatura object above.

Sample billing excerpt, for illustration only; it is not a complete request. Adjust the reference month, the periods and the due date to the real bill. The due date cannot be earlier than the date you send the request.

{
    "fatura": {
        "competencia_fatura": "202610",
        "data_vencimento": "2026-11-10",
        "data_periodo_inicial": "2026-10-01",
        "data_periodo_final": "2026-10-31",
        "codigo_barras_fatura": "34191234567890123456789012345678901234567890",
        "numero_debito_automatico": "DEB123456"
    }
}

Issuing an NFCom
Optional information

Optional groups of the issuing request: send only the ones that apply to the transaction.

Authorized to download the XML

You can authorize specific CPFs (individual taxpayer IDs) or CNPJs (company IDs) to download the NFCom XML directly from SEFAZ. This is useful for accountants, business partners or integrated systems.

Parameter Required Type Size Description
autorizar_download
Optional
array Max. 10 Array of strings with the authorized CPFs or CNPJs
The system detects automatically whether it is a CPF (11 digits) or a CNPJ (14 characters)

Example:

{
    ...
    "autorizar_download": [
        "12345678909",      // Fictitious CPF
        "12345678000195",   // Fictitious CNPJ
        "98765432100"       // CPF
    ],
    ...
}
Download authorization. Up to 10 authorized IDs per NFCom, sent as digits only, without punctuation. The system detects automatically a CPF (11 digits) or a CNPJ (14 characters). Each document must be a string with a valid CPF or CNPJ; invalid values cause a validation error.

Special indicators

The NFCom lets you send indicators specific to the telecommunications sector. They affect the taxes and the characteristics of the service.

Parameter Required Type Size Description
indicador_pre_pago
Optional
integer 1 Whether the service is prepaid
1 - Prepaid service
indicador_cessao_meios_rede
Optional
integer 1 Whether it is a network resource assignment
1 - The bill group (gFat) is not generated
indicador_nota_entrada
Optional
integer 1 Whether it is an inbound invoice
1 - Inbound invoice

Example with indicators:

{
    ...
    "indicador_pre_pago": 1,
    ...
}
Note: The three indicators are optional and accept only the value 1 when sent. Leave out the indicators that do not apply; do not send 0. When an indicator is not sent, its tag is not included in the XML.

NFCom replacement

Use the substituicao object to replace an NFCom or to reference a model 21/22 document (the earlier communication and telecommunication invoices). Send the access key of the replaced NFCom or the data of the referenced invoice, plus the reason. When you send nf_referenciada, its fields cnpj, modelo, serie, numero and competencia are required, even if you also send the access key.

Parameter Required Type Size Description
substituicao.chave_nfcom_substituida
Required depending on the note
string 44 Access key of the replaced NFCom
Required when nf_referenciada is not sent
substituicao.motivo
Required
string 2 Reason for the replacement
01 - Price error
02 - Registration data error
03 - Court decision
04 - Tax error
05 - Service discontinued
06 - Special regime
substituicao.nf_referenciada.cnpj
Required depending on the note
string 14 CNPJ of the issuer of the referenced invoice
Required when nf_referenciada is sent
substituicao.nf_referenciada.modelo
Required depending on the note
string 2 Model of the referenced invoice
21 or 22
substituicao.nf_referenciada.serie
Required depending on the note
string 3 Series of the referenced invoice
substituicao.nf_referenciada.numero
Required depending on the note
integer 1-9 Number of the referenced invoice
substituicao.nf_referenciada.competencia
Required depending on the note
string 6 Billing period of the referenced invoice
Format: YYYYMM (year and month)
substituicao.nf_referenciada.hash115
Optional
string - - - Hash of ICMS Agreement 115 (optional)

Example:

{
    ...
    "finalidade": 3,
    "substituicao": {
        "chave_nfcom_substituida": "35240112345678901234620010000001231234567890",
        "motivo": "04"
    }
}

Co-billing

Co-billing information. Use it when another operator does the billing under a co-billing arrangement. When you send the cofaturamento object, fill in chave_nfcom_local or nf_referenciada. When you send nf_referenciada, its fields cnpj, modelo, serie, numero and competencia are required; hash115 is optional.

Parameter Required Type Size Description
cofaturamento.chave_nfcom_local
Required depending on the note
string 44 Access key of the NFCom issued by the local operator
cofaturamento.nf_referenciada.cnpj
Required depending on the note
string 14 CNPJ of the referenced invoice (model 21/22)
cofaturamento.nf_referenciada.modelo
Required depending on the note
string 2 Model of the referenced invoice
cofaturamento.nf_referenciada.serie
Required depending on the note
string 3 Series of the referenced invoice
cofaturamento.nf_referenciada.numero
Required depending on the note
integer 1-9 Number of the referenced invoice
cofaturamento.nf_referenciada.competencia
Required depending on the note
string 6 Billing period of the referenced invoice
cofaturamento.nf_referenciada.hash115
Optional
string - - - Hash of ICMS Agreement 115 (optional)

Example:

{
    ...
    "cofaturamento": {
        "chave_nfcom_local": "35240712345678901234620010000001191234567890"
    },
    ...
}

Inbound invoice

For inbound invoices, use indicador_nota_entrada = 1, described in Special indicators. The NFCom API has no separate nota_entrada group.

Issuing an NFCom
Replacement NFCom

The replacement NFCom replaces an NFCom or references a model 21/22 invoice. The substituicao object accepts the access key of the replaced NFCom or the data of the model 21/22 invoice, plus the reason.

To issue a replacement NFCom, send a POST request to the URL /2/nfcom/emissao, with finalidade = 3 and the substituicao object filled in.

Parameters specific to replacement

Parameter Required Type Size Description
substituicao
Optional
object - - - Optional object in the API validation; send it to include the replacement reference in the XML
substituicao.chave_nfcom_substituida
Required depending on the note
string 44 Access key of the NFCom to be replaced
Required when there is no referenced invoice
substituicao.motivo
Required
string 2 Reason for the replacement
01 - Price error
02 - Registration data error
03 - Court decision
04 - Tax error
05 - Service discontinued
06 - Special regime
substituicao.nf_referenciada
Required depending on the note
object - - - Data of the model 21/22 invoice: cnpj, modelo, serie, numero, competencia and hash115 (optional)
Required when chave_nfcom_substituida is not sent; the first five fields are required when this object is sent

Partial example of a replacement NFCom, with fictitious data. Fill in the other required issuing fields and use the real access key of the referenced document. This example does not prove authorization by SEFAZ.

curl -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ambiente": 2,
    "finalidade": 3,
    "tipo_operacao": 1,
    "cliente": {
      "cnpj": "12345678000195",
      "razao_social": "Empresa Exemplo LTDA",
      "indicador_ie": 2,
      "endereco": {
        "logradouro": "Rua Exemplo",
        "numero": "123",
        "bairro": "Centro",
        "codigo_municipio": "3550308",
        "municipio": "São Paulo",
        "uf": "SP",
        "cep": "01310100"
      }
    },
    "assinante": {
      "tipo": 1,
      "tipo_servico": 4,
      "contrato": {
        "numero": "CONTRATO-EXEMPLO",
        "data_inicio": "2026-01-01",
        "data_fim": "2026-12-31"
      }
    },
    "substituicao": {
      "chave_nfcom_substituida": "35240112345678901234620010000001231234567890",
      "motivo": "04"
    },
    "itens": [
      {
        "descricao": "Internet Banda Larga 100MB - Correção Tributária",
        "codigo_classificacao": "400401",
        "unidade": "MES",
        "quantidade": 1,
        "valor_unitario": 99.90,
        "valor_total": 99.90,
        "indicador_total": 1,
        "impostos": {
          "icms": {
            "situacao_tributaria": "40",
            "codigo_cfop": "5307"
          }
        }
      }
    ]
  }' \
  https://api.webmania.com.br/2/nfcom/emissao

Issuing an NFCom
Adjustment NFCom

The finalidade field accepts the values 1, 2, 3 or 4. In the XML, the value 1 produces finNFCom = 0; the values 2, 3 and 4 produce finNFCom = 3 (replacement). The XML has no separate adjustment or supplementary type: an NFCom adjustment is issued as a replacement.

To issue an adjustment NFCom, send a POST request to the URL /2/nfcom/emissao, with the finalidade and the substituicao object.

Note: To include the reference of the replaced invoice, send the substituicao object described in the previous section. The example below shows request fields and does not prove authorization by SEFAZ; the tax values are for illustration only.

Partial example of a request with finalidade = 3, with fictitious data. Fill in the other required issuing fields and use the real access key of the referenced document.

curl -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ambiente": 2,
    "finalidade": 3,
    "tipo_operacao": 1,
    "cliente": {
      "cpf": "12345678909",
      "nome_completo": "João da Silva",
      "indicador_ie": 9,
      "endereco": {
        "logradouro": "Av. Principal",
        "numero": "500",
        "bairro": "Jardim",
        "codigo_municipio": "3550308",
        "municipio": "São Paulo",
        "uf": "SP",
        "cep": "04567890"
      }
    },
    "assinante": {
      "tipo": 3,
      "tipo_servico": 1,
      "contrato": {
        "numero": "CONTRATO-EXEMPLO",
        "data_inicio": "2026-01-01",
        "data_fim": "2026-12-31"
      }
    },
    "substituicao": {
      "chave_nfcom_substituida": "35240112345678901234620010000001231234567890",
      "motivo": "04"
    },
    "itens": [
      {
        "descricao": "Ajuste de Cobrança - Telefonia Móvel",
        "codigo_classificacao": "300101",
        "unidade": "MIN",
        "quantidade": 100,
        "valor_unitario": 0.50,
        "valor_total": 50.00,
        "indicador_total": 1,
        "impostos": {
          "icms": {
            "situacao_tributaria": "00",
            "codigo_cfop": "5307",
            "valor_base_calculo": 50.00,
            "aliquota_icms": 18,
            "valor_icms": 9.00
          }
        }
      }
    ]
  }' \
  https://api.webmania.com.br/2/nfcom/emissao

Issuing an NFCom
Classification codes

Send the codigo_classificacao (service classification code) of each item, in itens[] or in impostos.codigo_classificacao, exactly as shown in the tables below. Codes have 6 or 7 digits; do not add leading zeros. For example, send 100101 for a subscription to telephone services. When it generates the XML, the API pads the code to 7 digits (0100101 in this example).

The classification code sets the validations applied when the NFCom is authorized. It also sets how the item value counts in the invoice total: codes that start with the digit 5 are deducted from the invoice total, and the others, which start with zero in the XML, are added to the total.

Each group shows four characteristics, with a Yes or No icon: Deducted (deducted value), Prepaid, Central billing (centralized billing) and COFAT (co-billing).

010 - Subscription
Deducted
Prepaid
Central billing
COFAT
CodeDescription
100101Subscription to telephone services
100201Subscription to data communication services
100301Subscription to pay TV services
100401Subscription to multimedia communication services
020 - Activation
Deducted
Prepaid
Central billing
COFAT
CodeDescription
200101Activation of telephone services
200201Activation of data communication services
200301Activation of pay TV
030 - Metered service
Deducted
Prepaid
Central billing
COFAT
CodeDescription
300101Metered service - Local calls
300102Metered service - National long-distance calls
300103Metered service - International long-distance calls
300104Metered service - Calls made while roaming
300105Metered service - Calls received while roaming
300106Metered service - Call surcharge
300107Metered service - Special numbers (0300/0500/0600/0800/etc.)
300108Metered service - SMS message
300109Metered service - MMS message
300201Metered service - Data communication
300301Metered service - Pay-per-view (TV programming)
300401Metered service - Multimedia communication
040 - Unmetered service
Deducted
Prepaid
Central billing
COFAT
CodeDescription
400101Unmetered service - Telephone
400201Unmetered service - Data communication
400301Unmetered service - Pay TV
400401Unmetered service - Internet access
400501Unmetered service - Multimedia communication
045 - Bundled services
Deducted
Prepaid
Central billing
COFAT
CodeDescription
450101Bundled services (data, voice, messages and others)
050 - Prepaid service
Deducted
Prepaid
Central billing
COFAT
CodeDescription
500101Phone card - Landline telephone
500102Credit load / top-up - Landline telephone
500201Credit load / top-up - Mobile telephone
500301Credit load / top-up - Multimedia communication service
500401Credit load / top-up - Pay TV
500501Credit top-up - Advance
500601Prepaid pass-through
060 - Other services
Deducted
Prepaid
Central billing
COFAT
CodeDescription
600101Additional features (caller ID, voicemail, do not disturb, etc.)
600201Video and audio streaming
600301Tracking service
600401Placement of advertising in any medium
0600401Placement of advertising in any medium (alternative format accepted by the API, equivalent to 600401)
600501Other services (number change, device exchange, installation, software, technical visit, etc.)
600601Other value-added services
070 - Network resource assignment
Deducted
Prepaid
Central billing
COFAT
CodeDescription
700101Interconnection
700201Roaming
700301Industrial use of a dedicated line (EILD)
700401ICMS entry proportional to exempt, non-taxed or reduced-base outputs (§ 1, third clause, ICMS Agreement 17/2013)
700501ICMS entry proportional to network resource assignments for own consumption (§ 1, third clause, ICMS Agreement 17/2013)
700601Supplementary ICMS entry, as the party liable for the tax
080 - Equipment provision
Deducted
Prepaid
Central billing
COFAT
CodeDescription
800101Telephone set
800201Caller ID device
800301Modem
800401Rack
800501Room/premises
800601Router
800701Server
800801Multiplexer
800901Decoder/converter
801001Other equipment
100 - Own billing
Deducted
Prepaid
Central billing
COFAT
CodeDescription
1000101Insurance charges
1000201Installment charges
1000301Late payment interest
1000401Late payment fine
1000402Fine for breach of contract (loyalty period)
1000501Charges for bills of previous months
1000601Inflation adjustment
1000701Fees
590 - Deductions
Deducted
Prepaid
Central billing
COFAT
CodeDescription
5900101Deduction for disputed services
5900201Deduction for bill adjustment
5900301Deduction for the fine for service interruption
5900401Deduction for duplicate payment
5900501Other deductions
120 - Centralized billing
Deducted
Prepaid
Central billing
COFAT
CodeDescription
1200101Item entered in another NFCom - Centralized billing
130 - Co-billing
Deducted
Prepaid
Central billing
COFAT
CodeDescription
1300101Item entered in another NFCom - Co-billing

Tax reform

From 2026, the new taxes of the Brazilian tax reform start to apply gradually. The Webmania® API already accepts the IBS and CBS data of the NFCom, described in the subsections below.

What changes with the tax reform?

Complementary Law 214/2025 created three new taxes that will gradually replace the current taxes:

IBS

State and city goods and services tax (Imposto sobre Bens e Serviços), a value-added tax shared by states and cities. Replaces ICMS and ISS gradually. Glossary

CBS

Federal goods and services tax (Contribuição sobre Bens e Serviços), the new federal value-added tax. Replaces PIS and COFINS. Glossary

IS

Selective tax (Imposto Seletivo), on goods harmful to health or the environment, such as tobacco and alcoholic drinks. It starts in 2027. Glossary

How will the transition work?

The move to the new taxes happens gradually until 2033. Simplified schedule of the rates:

Year IBS CBS Current taxes
2026 0.1% state 0.90% No changes
2027 0.05% state and 0.05% municipal 8.80% PIS/COFINS abolished.
IPI rate reduced to 0%, except for products with incentives in the Manaus Free Trade Zone.
2029-2032 Rates set by the Senate Gradual reduction of ICMS and ISS
2033 Transition complete ICMS and ISS abolished

Tax reform
IBS/CBS

To send the IBS and the CBS, use the ibs_cbs object. You can send it at document level, in impostos.ibs_cbs, and/or in each item, in itens[].impostos.ibs_cbs. Attention: when the item uses classe_imposto, the ibs_cbs sent in that item is discarded, because the Tax Class defines the taxes of the item. In that case, send the group at document level; otherwise the issuing request is rejected because the IBS/CBS data is missing. The table below lists the parameters of the group:

Parameter Required Type Size Description
impostos.ibs_cbs.situacao_tributaria
Required depending on the note
string 3 CST (tax status code) of IBS/CBS. Together with the cClassTrib, it says how IBS and CBS apply
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
Required when the related ibs_cbs group is sent. Send a string with exactly 3 characters and a code valid for NFCom.
impostos.ibs_cbs.classificacao_tributaria
Required depending on the note
string 6 cClassTrib (tax classification code) of IBS/CBS: standard rate, reduced rate, exemption and so on
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
Required when the related ibs_cbs group is sent. Send a string with exactly 6 characters and a classification valid for the CST and for NFCom.
impostos.ibs_cbs.indicador_doacao
Optional
boolean 1 Whether the transaction is a donation
Send a JSON boolean true/false or 1/0.
impostos.ibs_cbs.situacao_tributaria_regular
Required depending on the note
string 3 CST (tax status code) under the regular regime
See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese.
Required when the combination of CST and cClassTrib requires regular taxation. Send a string with exactly 3 characters; later normalization does not waive this length in the validation.
impostos.ibs_cbs.classificacao_tributaria_regular
Required depending on the note
string 6 cClassTrib (tax classification code) 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 or when the combination of CST and cClassTrib requires regular taxation. Send a string with exactly 6 characters.
impostos.ibs_cbs.ibs_estadual
Required depending on the note
object - - - State share of the IBS
Required with aliquota_diferimento when the CST enables deferral; optional in all other cases.
impostos.ibs_cbs.ibs_municipal
Required depending on the note
object - - - Municipal share of the IBS
Required with aliquota_diferimento when the CST enables deferral; optional in all other cases.
impostos.ibs_cbs.cbs
Required depending on the note
object - - - Federal goods and services tax (CBS)
Required with aliquota_diferimento when the CST enables deferral; optional in all other cases.
impostos.ibs_cbs.estorno_credito
Optional
object - - - IBS/CBS credit reversal

You can also send all the parameters above per item, in itens[].impostos.ibs_cbs, except when the item uses classe_imposto, which discards the item group. When the item has its own ibs_cbs, that object fully replaces the document group; the fields of the two levels are not merged.

Partial example of IBS/CBS at document level and at item level. It is not a complete issuing request:

{
  "impostos": {
    "ibs_cbs": {
      "situacao_tributaria": "000",
      "classificacao_tributaria": "000001"
    }
  },
  "itens": [
    {
      "descricao": "Serviço de comunicação",
      "impostos": {
        "ibs_cbs": {
          "situacao_tributaria": "000",
          "classificacao_tributaria": "000001"
        }
      }
    }
  ]
}

Tax reform
IBS/CBS — Simples Nacional NEW

In one sentence: in the NFCom of companies under the Simples Nacional (small business regime: several taxes in one monthly payment), and of companies in the standard regime (outside Simples Nacional) with a pending request to join the Simples Nacional, the invoice now states the company's IBS/CBS regime and, in each item, the IBS/CBS calculated at the Simples Nacional rates.

When it appliesSandboxProduction
New fields, regime rules and Simples Nacional calculationSince October 26, 2026Invoices with an issue date from December 14, 2026 (Brasília time)
Zero CBS for companies above the revenue sublimit without the regular regimeInvoices with an issue date from January 1, 2027
No new field is required when issuing. The Simples Nacional rates are optional on any date. Without a rate, the API calculates the Simples IBS/CBS with 0.00.

Do I need to do anything?

If your company is…What to do
Simples Nacional, above the revenue sublimit or notSend ibs_cbs in the document or in the items and, if you want, the Simples Nacional rates. If the company chose the regular IBS/CBS regime, mark this option in the company settings.
Standard regime, with a pending request to join the Simples NacionalIn the company settings, mark the pending option and choose the intended regime. Without an intended regime and without the regular regime, the issuing request is rejected.
Standard regime, with no pending requestNothing changes.
MEI (individual micro-entrepreneur)Nothing changes: the IBS/CBS works as before, without the Simples calculation.

How it works

The API reads the company's tax regime and the IBS/CBS regime options from the company settings. It then decides on its own how the IBS and the CBS go into the invoice. You do not send the regime when issuing. The regular IBS/CBS regime is the option of a Simples Nacional company to pay IBS and CBS under the general rules. A pending option is the situation of a standard-regime company that asked to join the Simples Nacional and is waiting for the decision.

If your company is…IBS/CBS under the general rules
(state IBS, city IBS and CBS)
IBS/CBS calculated under the Simples Nacional
Simples Nacional, without the regular regimeNoIBS and CBS
Simples Nacional above the revenue sublimit, without the regular regimeYes. From January 1, 2027, the API sets the CBS rate to zero, even if cbs.aliquota is sent.CBS only
Simples Nacional, above the revenue sublimit or not, with the regular regimeYesNo
Standard regime with a pending option for the Simples Nacional, without the regular regimeYesIBS and CBS
Standard regime with a pending option for the Simples Nacional above the revenue sublimit, without the regular regimeYesCBS only
Standard regime with a pending option, with the regular regimeYesNo
Standard regime, with no pending requestYesNo
MEIAs beforeNo

The API only calculates IBS/CBS for an item that has ibs_cbs in the item itself or in the document. Without ibs_cbs at either level, the item goes out without IBS/CBS. The choice of the regular regime takes effect from January 1, 2027. The API sends the regime according to the company settings.

Issuing parameters

Parameter NFCom Type Size Description
impostos.ibs_cbs.aliquota_ibs_sn
itens[].impostos.ibs_cbs.aliquota_ibs_sn
string 3v4 IBS rate under the Simples Nacional, in %, in the document or in the item.
From 0 to 100, with a dot and up to four decimal places. E.g. "1.2345"
Used only when the company calculates IBS under the Simples (see How it works).
impostos.ibs_cbs.aliquota_cbs_sn
itens[].impostos.ibs_cbs.aliquota_cbs_sn
string 3v4 CBS rate under the Simples Nacional, in %, in the document or in the item.
From 0 to 100, with a dot and up to four decimal places. E.g. "0.9000"

A rate with a comma or a percent sign makes the issuing request fail.

Where the API takes each rate from

If in the item…The API uses
the rate was sent, including "0"The item rate
the rate was left outThe document rate. Each rate is resolved separately.
the rate came as null or blank0.00. The document is not checked.
the item uses classe_impostoBoth document rates
there is no rate in the item or in the document0.00

Simples Nacional example

Rates in the document; the second item overrides the CBS. The item ibs_cbs replaces the document one, so the item repeats the CST and the cClassTrib:

{
  "impostos": {
    "ibs_cbs": {
      "situacao_tributaria": "000",
      "classificacao_tributaria": "000001",
      "aliquota_ibs_sn": "0.1000",
      "aliquota_cbs_sn": "0.9000"
    }
  },
  "itens": [
    { ... },
    {
      ...
      "impostos": {
        "ibs_cbs": {
          "situacao_tributaria": "000",
          "classificacao_tributaria": "000001",
          "aliquota_cbs_sn": "0" // zero wins; the IBS comes from the document
        }
      }
    }
  ]
}

Tax reform
State IBS

For the state share of the IBS, add the ibs_estadual object inside ibs_cbs.

Parameter Required Type Size Description
aliquota_diferimento
Required depending on the note
decimal 5v4 Deferral rate of the state IBS
Required in all three shares when the CST sent enables deferral in the API. The input validation requires a numeric value.
percentual_devolvido
Optional
decimal 5v4 Percentage of the state IBS refunded to the buyer
Send a value from 0 to 100. The API calculates the refunded amount from this percentage.
valor_devolvido
Optional
decimal 15v2 Amount of the state IBS refunded to the buyer
Optional. The amount issued is always the one the API calculates from percentual_devolvido. If you send valor_devolvido, it must match the percentage (tolerance of R$ 0.01); otherwise the issuing request is rejected before it is sent to SEFAZ.

Example of the state IBS:

"ibs_estadual": {
  "aliquota_diferimento": 10.0000,
  "percentual_devolvido": 50.0000
}

Tax reform
City IBS

For the municipal share of the IBS, add the ibs_municipal object inside ibs_cbs.

Parameter Required Type Size Description
aliquota_diferimento
Required depending on the note
decimal 5v4 Deferral rate of the city IBS
Required in all three shares when the CST sent enables deferral in the API. The input validation requires a numeric value.
percentual_devolvido
Optional
decimal 5v4 Percentage of the city IBS refunded to the buyer
Send a value from 0 to 100. The API calculates the refunded amount from this percentage.
valor_devolvido
Optional
decimal 15v2 Amount of the city IBS refunded to the buyer
Optional. The amount issued is always the one the API calculates from percentual_devolvido. If you send valor_devolvido, it must match the percentage (tolerance of R$ 0.01); otherwise the issuing request is rejected before it is sent to SEFAZ.

Example of the city IBS:

"ibs_municipal": {
  "aliquota_diferimento": 10.0000,
  "percentual_devolvido": 50.0000
}

Tax reform
CBS

For the CBS, add the cbs object inside ibs_cbs.

Parameter Required Type Size Description
aliquota_diferimento
Required depending on the note
decimal 5v4 Deferral rate of the CBS
Required in all three shares when the CST sent enables deferral in the API. The input validation requires a numeric value.
percentual_devolvido
Optional
decimal 5v4 Percentage of the CBS refunded to the buyer
Send a value from 0 to 100. The API calculates the refunded amount from this percentage.
valor_devolvido
Optional
decimal 15v2 Amount of the CBS refunded to the buyer
Optional. The amount issued is always the one the API calculates from percentual_devolvido. If you send valor_devolvido, it must match the percentage (tolerance of R$ 0.01); otherwise the issuing request is rejected before it is sent to SEFAZ.
alc_zfm_cbs
Optional
object - - - Transaction in an incentive area with a zero CBS rate

Example of the CBS:

"cbs": {
  "aliquota_diferimento": 10.0000,
  "percentual_devolvido": 50.0000
}

Tax reform
Zero CBS rate — ZFM/ALC

For the zero CBS rate on transactions in the Manaus Free Trade Zone (ZFM) or in free trade areas (ALC), add the alc_zfm_cbs object inside the cbs field. The group requires emitente.inscricao_suframa (the issuer's SUFRAMA registration) to be filled in. See General information.

Parameter Required Type Size Description
aliquota_efetiva_referencia
Required depending on the note
decimal 5v4 Effective reference rate of the CBS
When you use this name in the alc_zfm_cbs group, send a numeric value from 0 to 100, zero included. Do not combine it with another compatibility rate key in the same group. The group requires exactly one filled rate; null and an empty string do not count as filled. The API calculates the reference amount; do not send it.

Example of the zero CBS rate group:

"cbs": {
  "alc_zfm_cbs": {
    "aliquota_efetiva_referencia": 20.0000
  }
}

Tax reform
Credit reversal

To send an IBS/CBS credit reversal, add the estorno_credito object inside ibs_cbs. The API rejects this group when the cClassTrib sent does not allow a credit reversal.

Parameter Required Type Size Description
valor_ibs
Required depending on the note
decimal 15v2 Reversed IBS amount
Required when the estorno_credito object is sent.
valor_cbs
Required depending on the note
decimal 15v2 Reversed CBS amount
Required when the estorno_credito object is sent.

Illustrative fragment of the credit reversal structure; it is not a valid issuing request. The codes below are examples: replace them with a combination that allows a credit reversal. The codes shown here do not enable this group in the API:

"ibs_cbs": {
  "situacao_tributaria": "000",
  "classificacao_tributaria": "000001",
  "estorno_credito": {
    "valor_ibs": 10.00,
    "valor_cbs": 1.00
  }
}

Functions
Download the NFCom XML and PDF

The XML and the DANFECOM (PDF) of each NFCom are at the xml and danfecom URLs returned in the issuing response, the lookup and the notification. For security, Webmania restricts access to these files.

The tax document is encrypted with a password. You can only view it after confirming the CPF/CNPJ (individual taxpayer ID or company ID) of the customer on the invoice, or with one of these authentication methods: 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, apply access restrictions similar to Webmania's. Do not allow public access to tax documents that are not encrypted with a password.

Ways to access the files:

Authentication Access granted Password required? Description
Access credentials ✅ No When you send the company's access credentials in the request HEADER, you can access every tax document issued by the company.
Authorization: Bearer YOUR_ACCESS_TOKEN
Token ✅ No When you send the encrypted token in the URL, the tax document can be accessed for 24 hours without a password. Ideal for sharing a link.
?token=[TOKEN]
The token is not available for tax documents without a customer.
Issuing IP ✅ No When you issue an invoice, the IP of the computer/server is registered as authorized permanently. It 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 in your account. Access lasts while you are logged in to the Webmania® Panel.
Access while logged in
No authentication ❌ Yes When the URL is opened publicly without authentication, the tax documents are encrypted with a password. To open them, enter the CPF/CNPJ of the customer on the invoice (digits only, no punctuation).
PDF = password-protected PDF file
XML = password-protected ZIP

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

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 NFCom 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 the file, send a GET request to the XML URL (/xmlnfcom/{uuid|chave}) or the DANFECOM URL (/danfecom/{uuid|chave}), with the credentials in the header. Example with the DANFECOM:

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

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

Functions > Download the NFCom XML and PDF
Token

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

Attention. This feature is not available for tax documents without a customer. For those 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/danfecom/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 Webmania's GitHub: https://github.com/webmaniabr/DFeToken.

Functions
Look up an NFCom

The lookup returns the current status of an NFCom of the authenticated company, including while it is in processando or contingencia. Day-to-day tracking happens through the notifications: use the lookup to check a single NFCom when needed.

To look up an NFCom, send a GET request to the URL /2/nfcom/consulta/{identifier}, replacing {identifier} with the uuid or the access key of the NFCom.

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

Example of an HTTP 200 response. The fields are those of Notification fields. When available, the lookup also returns protocolo and data_autorizacao, the date and time of the authorization:

{
  "uuid": "00000000-0000-0000-0000-000000000000", // Unique identification number
  "chave": "00000000000000000000000000000000000000000000", // Access key at SEFAZ
  "serie": 1, // NFCom series
  "nfcom": 123, // NFCom number
  "modelo": "nfcom",
  "status": "aprovado", // aprovado, reprovado, cancelado, processando or contingencia
  "motivo": "Autorizado o uso da NFCom", // Reason for the status
  "contingencia": false,
  "protocolo": "135240000123456",
  "data_autorizacao": "10/01/2025 09:30:00",
  "xml": "https://api.webmania.com.br/xmlnfcom/[uuid]",
  "xml_cancelamento": null,
  "danfecom": "https://api.webmania.com.br/danfecom/[uuid]",
  "log": { ... } // SEFAZ response log
}

Functions
Cancel an NFCom

The cancellation registers an event at SEFAZ that voids an NFCom. Only an NFCom with status aprovado can be canceled.

To cancel an NFCom, send a PUT request to the URL /2/nfcom/cancelar, with the access key in chave (44 characters) and the reason for the cancellation in justificativa. The key accepts the numeric format and the format with an alphanumeric CNPJ: 6 digits, 12 alphanumeric characters and 26 digits.

Parameter Required Type Size Description
chave
Required
string 44 NFCom access key
justificativa
Required
string 15-255 Reason for the cancellation
curl -X PUT \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
   "chave": "00000000000000000000000000000000000000000000",
   "justificativa": "Cancelado por motivos administrativos."
}' \
https://api.webmania.com.br/2/nfcom/cancelar

The result comes in the response itself, without a notification:

SituationResponseWhat to do
Cancellation approvedstatus = canceladoStore the xml_cancelamento. The lookup now shows the NFCom as cancelado.
Cancellation not approvedstatus other than cancelado, with the motivoThe NFCom stays authorized. Read the motivo before you try again.

Example of an HTTP 200 response for an approved cancellation:

{
  "uuid": "00000000-0000-0000-0000-000000000000", // Unique identification number
  "chave": "00000000000000000000000000000000000000000000", // Access key at SEFAZ
  "status": "cancelado",
  "motivo": "Cancelado por motivos administrativos.", // Reason for the status
  "serie": 1, // NFCom series
  "numero": 123, // NFCom number
  "xml": "https://api.webmania.com.br/xmlnfcom/[uuid]",
  "xml_cancelamento": "https://api.webmania.com.br/xmlnfcom/[uuid]/cancelamento",
  "danfecom": "https://api.webmania.com.br/danfecom/[uuid]",
  "log": { ... } // SEFAZ response log
}

Functions
Service status

The service status tells you whether the NFCom service of SEFAZ is running. Use it to diagnose a communication failure: issuing already detects when SEFAZ is unavailable and switches to contingency mode on its own.

To check the service status, send a GET request to the URL /2/nfcom/status.

curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
https://api.webmania.com.br/2/nfcom/status

Example of an HTTP 200 response. operacional = true means the service is running, and mensagem describes the situation:

{
    "operacional": true,
    "mensagem": "Serviço NFCom operacional"
}

Contingency mode

Contingency mode is the backup procedure that lets you keep issuing when the tax authority is offline. Webmania® detects automatically when SEFAZ (state tax authority) is unavailable and issues the NFCom in offline contingency mode. Your application does not need to send anything again:

SituationStatusWhat Webmania does
SEFAZ is availableaprovado or reprovadoSends the NFCom in the same request and returns the result in the response.
SEFAZ is unavailable or does not answer the requestcontingenciaIssues the NFCom in offline contingency mode (tpEmis=2), with the XML and the DANFECOM in the response, and reprocesses it automatically.
The NFCom does not have the SEFAZ result yetprocessandoChecks SEFAZ automatically before any new attempt, until it gets the result.
NFCom issuing and contingency When it receives the POST /2/nfcom/emissao, Webmania checks whether SEFAZ (the state tax authority) is available. If it is, the NFCom is sent in the same request and the response returns aprovado or reprovado. When SEFAZ is unavailable, or does not answer the request, the NFCom is issued in offline contingency mode (tpEmis=2), with the contingencia status and the XML and the DANFE-COM in the response. Reprocessing is automatic, at increasing intervals. Before any resend, Webmania looks up the NFCom status at SEFAZ: if it was already processed, Webmania records the result; if SEFAZ did not receive it, Webmania resends it; if the lookup is inconclusive, Webmania keeps the NFCom pending and tries again. After 21 attempts without a conclusive answer, the NFCom stays in contingency mode and the automatic attempts stop for manual reconciliation. The final result, aprovado or reprovado, arrives through the url_notificacao and the lookup. POST /2/nfcom/emissao Is SEFAZ available? Sent to SEFAZ in the same request Offline contingency contingencia · tpEmis=2 with XML and DANFE-COM in the response Immediate response aprovado reprovado Automatic reprocessing at increasing intervals Looks up the status at SEFAZ before any resend NFCom resent not received by SEFAZ Manual reconciliation after 21 attempts Final result in your application aprovado or reprovado, in the url_notificacao and the lookup Yes No no response inconclusive processed not received limit
Webmania® step Check Final result Waiting for the result: not a final status Requires manual action Your application New attempt
While the NFCom is in contingencia, follow it through the lookup, without issuing it again. The url_notificacao receives the final result.

How contingency mode works

StepWhat happens
DetectionWebmania detects the communication failure with SEFAZ and turns on contingency mode automatically.
Offline issuingThe NFCom is issued with tpEmis=2 (contingency because there is no communication) and the status contingencia. Webmania stores it until SEFAZ is back.
NotificationIf you sent a url_notificacao, it receives the contingencia notification.
ReprocessingThe automatic reprocessing uses growing intervals. Before sending again, Webmania checks the NFCom at SEFAZ. If that check is not conclusive, the document stays pending and is not sent again in that attempt.
Final resultWhen the NFCom is sent successfully, the status changes to aprovado or reprovado and a new notification is sent.
Attempt limitAfter 21 contingency attempts, Webmania checks SEFAZ. If the answer is still not conclusive, it keeps the NFCom in contingency mode and stops the automatic attempts for manual reconciliation. The limit is not a guaranteed completion time.

Errors that turn on contingency mode

Automatic activation covers transport failures, such as a timeout or a connection error with SEFAZ. The response codes below are examples of failures or unavailability. On their own, they do not guarantee that contingency mode turns on: the handling depends on the response received.

Code Description
109 Service stopped with no forecast
508 Failure processing the request
999 Uncatalogued error
timeout Communication timeout
connection Connection error with SEFAZ

Response in contingency mode

Example of an HTTP 200 response for an NFCom issued in contingency mode:

{
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "chave": "35240712345678901234620010000001191234567890",
    "serie": 1,
    "nfcom": 120,
    "modelo": "nfcom",
    "status": "contingencia",
    "motivo": "NFCom emitida em contingência. Será processada quando a SEFAZ retornar.",
    "contingencia": true,
    "xml": "https://api.webmania.com.br/xmlnfcom/550e8400-e29b-41d4-a716-446655440000",
    "xml_cancelamento": null,
    "danfecom": "https://api.webmania.com.br/danfecom/550e8400-e29b-41d4-a716-446655440000",
    "log": { ... }
}
NFCom in contingency mode. An NFCom in contingency mode is valid and can be printed as usual. The DANFECOM shows a watermark for contingency mode. Follow the same uuid and do not issue it 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. v2.1.0 · December 3, 2026 · Documentation · Added

    NFCom has a new section, IBS/CBS — Simples Nacional: what changes for each type of company, the tax regime set in the company record, the Simples rates on the invoice and per item, and the dates per environment.

    Changed section: reforma-tributaria-simples-nacional-nfcom

  2. v2.0.4 · November 17, 2026 · Documentation · Changed

    The contingency system now has a flowchart of offline issuing, of the lookup before each resend and of manual reconciliation.

    Changed section: sistema-contingencia

  3. v2.0.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.