Documentation

Issue an NFC-e

Issue the NFC-e of a sale with POST /v1/fiscal-invoices and type NFCE: items, payments, accepted CFOPs and the SEFAZ response.

Before you start

In the API, the fiscal invoice is a single resource, /v1/fiscal-invoices: the NFC-e, the NF-e and the NFS-e go through the same route, with the same body, and the type field — the invoice type — picks which. This page covers the NFC-e (Brazil's consumer e-invoice), "type": "NFCE".

The invoice is issued with one of the organization's fiscal credentials, registered in the dashboard under Notas fiscais → Credenciais (Invoices → Credentials): CNPJ (company taxpayer ID), state registration (IE — required for the NFC-e), address with the city's IBGE code, the A1 digital certificate (a file-based ICP-Brasil certificate) with its password, and the CSC (the taxpayer security code for the NFC-e QR code) from SEFAZ (the state tax authority). Each credential has its own key, the API Key, sent in the X-Credential-Key header.

HeaderValue
AuthorizationBearer <token> — the organization's API token (Authentication)
X-Credential-Keythe fiscal credential's API Key
Content-Typeapplication/json

The /v1/fiscal-invoices routes accept only the organization's API token. The NFC-e works in all 27 states. Error messages of the fiscal routes are in Portuguese (the audience is the Brazilian taxpayer); they are quoted below as the API returns them.

Types

type is the invoice type, by name, in upper or lower case ("NFCE" or "nfce"; the response always carries it in upper case). A new type changes neither the route nor the body: it just becomes accepted.

typeDocumentPage
NFCENFC-e (SEFAZ model 65) — consumer receipt, over-the-counter salethis one
NFENF-e (SEFAZ model 55) — invoice with a recipient (sale to a company or person, transfer, shipment, return)Issue NF-e
NFSENational NFS-e (Sefin Nacional) — service invoiceIssue NFS-e

Any other value answers 400 with O tipo de nota "XYZ" não é aceito. Aceitos: NFCE (NFC-e), NFE (NF-e), NFSE (NFS-e). — the model code (65, 55) is not accepted in place of the type.

One body for every type

The body of POST /v1/fiscal-invoices has the same top-level fields for every type. What changes is what each type requires:

FieldNFCENFENFSE
type"NFCE""NFE""NFSE"
environmentrequired: 1 production, 2 homologationrequired: 1 production, 2 homologationrequired: 1 production, 2 restricted production
referenceCodeoptionaloptionaloptional
recipientoptional: the consumer (document, name, address) and the email; document required above R$ 10,000.00required: document, name and full address; on an export, the country and the foreign addressoptional (the service taker): document and name; address optional
itemsrequired; each item with code, description, ncm, cfop, unit, quantity, unitPrice and totalPricerequired; the same fields as the NFC-e, with an outgoing CFOP from the official tablerequired, one or more (up to 1000 with ncm); only description, totalPrice, quantity and ncm are read (the first two required; code, cfop, unit and unitPrice are ignored), and the invoice sums the items into a single service
paymentsrequiredoptional; without them the invoice goes out "without payment"optional; validated but not transmitted
optionssendEmail and the IBS/CBS fieldsthe IBS/CBS ones, natureOperation, referencedDocuments, freightMode, additionalInfo, consumerFinal, presential, authorizedDocuments, export (only on an export), sendEmailservice (required), additionalInfo, consumerFinal, sendEmail

The details of each column are on this page (NFC-e), in Issue NF-e and in Issue NFS-e.

Issue the invoice

curl -X POST https://api.intopays.com/v1/fiscal-invoices \
  -H "Authorization: Bearer $INTOPAYS_TOKEN" \
  -H "X-Credential-Key: $INTOPAYS_FISCAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "NFCE",
    "environment": 2,
    "referenceCode": "sale-1042",
    "recipient": { "document": "123.456.789-09", "name": "Ana Souza", "email": "[email protected]" },
    "items": [
      {
        "code": "X-BURGER",
        "description": "X-Burger",
        "ncm": "21069090",
        "cfop": "5102",
        "unit": "UN",
        "quantity": 2,
        "unitPrice": 25.00,
        "totalPrice": 50.00
      }
    ],
    "payments": [
      { "method": "CASH", "amount": 60.00, "change": 10.00 }
    ],
    "options": { "sendEmail": true }
  }'

With a Regime Normal (CRT 3) credential, in homologation add options.ibsCbsCst and options.ibsCbsClassCode (see IBS and CBS); without them the API answers 400, because SEFAZ already rejects that invoice without the group (rejection 1115).

FieldRequiredValues
typeyes"NFCE"
environmentyes1 production, 2 homologation (test, no fiscal value). No default
itemsyesone or more items, fields in the table below
paymentsyesone or more payments — see Payment methods
referenceCodenothe sale's identifier in your system, returned in the response and the webhooks, and usable as a list filter
recipientnothe consumer on the invoice — see Identified consumer — and the customer's email to send the invoice. Required (with document) when the total is over R$ 10,000.00
options.sendEmailnotrue sends the authorized invoice to recipient.email (default false)
options.ibsCbsCst, options.ibsCbsClassCode, options.simplesActivityCode, options.simplesIbsRate, options.simplesCbsRatenothis invoice's IBS/CBS — see IBS and CBS

Item

FieldRequiredValues
codeyesthe product code in your system
descriptionyesproduct description
ncmyes8-digit NCM (Mercosur product code)
cfopyesthe sale's CFOP — see CFOP on the NFC-e
unityesunit, such as UN or KG
quantityyesquantity
unitPriceyesunit price in reais
totalPriceyesquantity × unitPrice
gtinnobarcode; without it, or when invalid, SEM GTIN (no GTIN) is printed
ibsCbsCst, ibsCbsClassCodenothis item's IBS/CBS classification (3-digit CST + 6-digit cClassTrib), when it differs from the invoice's (options) — see IBS and CBS
simplesActivityCodenoSimples Nacional only: the item's activity code (01, 02, 03, 04 or 90); default: options.simplesActivityCode
cest, icmsOrigin, icmsRatenothe CEST (7 digits, required on an item under tax substitution), the origin of the goods ("0" to "8") and the item's ICMS rate in % — see Item taxes
icmsCsosn, icmsCst, icmsBenefitCode, pisCst, cofinsCst, approximateTaxesnothis item's ICMS, PIS/COFINS and approximate taxes — see Item taxes

Identified consumer

The NFC-e goes out without a consumer when recipient has no document. For the "CPF na nota" (the buyer's CPF, or CNPJ, printed on the receipt), send the document; name and address are optional and only go on the invoice together with it.

FieldRequiredValues
recipient.documentabove R$ 10,000.00the consumer's CPF (11 digits) or CNPJ (14 characters, numeric or alphanumeric), with or without punctuation; the check digit is verified
recipient.namenothe consumer's name, up to 60 characters. In homologation SEFAZ requires a standard text instead of the name, and Intopays writes it
recipient.street, streetNumber, neighborhood, cityCode, cityName, ufnothe address; if one is sent, all of these are required. cityCode is the municipality's IBGE code (7 digits), which must belong to uf. Street, neighborhood and city name take 2 to 60 characters; the number, 1 to 60
recipient.complement, recipient.zipCodenocomplement (up to 60 characters) and ZIP code (CEP, 8 digits)
recipient.emailnonot written on the invoice: it is only used to send the invoice

SEFAZ rules the API checks before sending:

  • Above R$ 10,000.00 the consumer's CPF or CNPJ is required (rejection 750). Without it the API answers 400 and nothing is numbered. That amount is the national rule; the regulation lets each state set another limit, and in that case it is the state's SEFAZ that refuses the invoice. Some states also require the name and the address above the limit (rejections 751 and 752): send both on large sales.
  • There is no state registration on the NFC-e: the consumer always goes as a non-taxpayer. For a recipient with a state registration (IE), or a sale to another state, issue an NF-e.
  • A CNPJ is accepted. The ban on NFC-e for a buyer with a CNPJ (Ajuste SINIEF 11/2025) was revoked before it took effect (Ajuste SINIEF 12/2026). When the buyer's CNPJ is irregular in the tax register, SEFAZ authorizes the invoice with an alert: the status is AUTHORIZED and the reason starts with 120 - Autorizado o uso da NF-e, com alerta, followed by the alert.

On an up-to-date POS, the CPF or CNPJ typed under Dados do Cliente (Customer data) goes on the invoice when it is valid, with the name; a mistyped document does not, and the invoice goes out without a consumer.

Payment methods

Every invoice type uses the same vocabulary in payments[].method; Intopays converts it into SEFAZ's tPag code. Each payment is { "method", "amount", "change"?, "description"? }, amounts in reais.

methodMethodtPag
CASHCash — accepts change01
CHECKCheck02
CREDIT_CARDCredit card03
DEBIT_CARDDebit card04
STORE_CARDStore card (private label)05
FOOD_VOUCHERMeal voucher (groceries)10
MEAL_VOUCHERMeal voucher (restaurants)11
GIFT_CARDGift card12
FUEL_VOUCHERFuel voucher13
BOLETOBoleto (bank slip)15
BANK_DEPOSITBank deposit16
PIXPix (charge / dynamic QR)17
BANK_TRANSFERBank transfer or digital wallet18
LOYALTYLoyalty program, cashback or virtual credit19
PIX_STATICPix (static QR)20
STORE_CREDITStore credit21
OTHEROther — description (2 to 60 characters) goes on the invoice; default "Outros"99
NONENo payment — only on the NF-e, on its own90

The old type field (the SEFAZ code, such as "01") is no longer accepted: the API answers 400 asking for method.

CFOP on the NFC-e

The CFOP (fiscal operation code) is the 4-digit code from the official table that says what operation the invoice is. The NFC-e is always a sale to a consumer inside the state; SEFAZ accepts only these CFOPs on it (rejection 725), and Intopays accepts all of them: 5101 (sale of own production), 5102 (sale of goods bought for resale — the most common), 5103, 5104, 5115, 5405 (sale under tax substitution), 5656 and 5667 (fuel) and 5933 (service taxed by ISSQN — a delivery fee, for example). A 5933 item carries ISS instead of ICMS: send items[].issqn with the service list item and the rate (the fields are in Service with ISSQN); 5933 without issqn, or issqn on another CFOP, SEFAZ rejects (374) and the API answers 400 before numbering. The tax of each item follows, by default, the credential's tax regime (Simples Nacional and MEI: CSOSN 102; Simples over the sublimit and regular regime: CST 00 at 18%); a product under tax substitution carries its own code on the item — see Item taxes. From a MEI (individual micro-entrepreneur) SEFAZ only accepts CFOP 5102 on the NFC-e (rejection 337); another CFOP answers 400 with O CFOP … não é aceito na NFC-e de um MEI….

Item taxes

With no field, each item of the receipt goes out with the default of the credential's regime: CSOSN 102 for Simples Nacional and MEI, CST 00 at 18% (or the item's rate, icmsRate) for Simples over the sublimit and the regular regime, PIS/COFINS 07. For a product that differs, choose the code on the item — the same fields as the NF-e:

Item fieldRequiredValues
icmsCsosnnoSimples Nacional: "102" (default), "103", "300", "400" or "500"
icmsCstnoSimples over the sublimit and regular regime: "00" (default), "40", "41", "50" or "60"
icmsBenefitCodenocBenef from your state's table (8 or 10 characters), or "SEM CBENEF"
pisCst, cofinsCstno"04" to "09" (default "07") or "49" to "99"
approximateTaxesnothe item's approximate taxes in reais (Lei 12.741/2012), from 0 up to the item value

Tax substitution. Goods whose ICMS was already collected by tax substitution (beverages, cigarettes, fuel and others) go out with CFOP 5405 (or 5656 / 5667 for fuel) and their own ICMS code: "icmsCsosn": "500" under Simples, "icmsCst": "60" under the regular regime. SEFAZ checks the CFOP × code pair (rejections 386 and 382); without the field the item goes out with the default and SEFAZ may reject the invoice.

{ "code": "7894900011517", "description": "Refrigerante lata 350 ml", "ncm": "22021000", "cfop": "5405", "unit": "UN",
  "quantity": 2, "unitPrice": 6.00, "totalPrice": 12.00, "gtin": "7894900011517",
  "icmsCsosn": "500", "pisCst": "04", "cofinsCst": "04", "approximateTaxes": 3.77 }

Approximate taxes. The receipt is a sale to the final consumer: Lei 12.741/2012 asks for the approximate amount of taxes. Send approximateTaxes on each item (the IBPT table gives the percentage per NCM); the invoice adds up the items and the receipt PDF prints "Tributos Totais Incidentes (Lei Federal 12.741/2012)". Without the field the line does not appear.

A code that is not of the credential's regime, a code that needs a rate (ICMS 10, 20…; PIS/COFINS 01 to 03) or a malformed value answers 400 before the invoice takes a number. For a MEI do not send icmsCsosn. On the POS this data lives on the terminal (the store default) and on the product (the exception).

Item values and complete ICMS

An NFC-e item takes the same fields as the NF-e: discount, freight, insurance and other expenses per item, taxable unit, batches, additional information (Item values and product data) and the whole ICMS group in icms (Complete ICMS) — for example CST 60 with the withheld ICMS (vBCSTRet, pST, vICMSSTRet) that some states ask for on consumer sales. On the NFC-e every item goes into the total: includeInTotal: false answers 400 (rejection 774). The Selective Tax (selectiveTax, from February 2027 — sugary and alcoholic drinks, for example) also applies to the NFC-e. DIFAL does not apply: an NFC-e is always an in-state sale.

Offline contingency

With no internet or SEFAZ down, the NFC-e can be issued in offline contingency (tpEmis 9): the invoice is signed, takes its number, the DANFE is handed to the consumer and the transmission to SEFAZ happens later. Send options.contingency with the reason:

"options": { "contingency": { "reason": "Sem conexao com a SEFAZ desde as 10h" } }
  • The response is 201 with status: "CONTINGENCY": the number was used and the PDF is ready, with "EMITIDA EM CONTINGÊNCIA — Pendente de autorização" and the contingency QR Code. Nothing was sent to SEFAZ.
  • Intopays transmits the invoices in contingency every minute. Once authorized (including SEFAZ's 150 for a late transmission), the invoice becomes AUTHORIZED and the fiscal.update webhook goes out; PATCH /v1/fiscal-invoices/:id/sync transmits right away.
  • Rejected, the invoice stays REJECTED with SEFAZ's reason. The rule is to send the corrected invoice again with the same number and series — voiding that number is forbidden.
  • The legal deadline is the end of the first business day after issuance (Ajuste SINIEF 19/16). Each state decides whether it accepts offline contingency (rejection 712): check with your state's SEFAZ.
  • The reason has 15 to 256 characters. The NF-e has no offline contingency — it uses the SVC.

IBS and CBS (the tax reform)

The NFC-e carries IBS and CBS the same way as the NF-e. The classification and the Simples data come on each request, never from the fiscal credential. Each item's classification comes, in this order: from the item (ibsCbsCst + ibsCbsClassCode), from the invoice (options.ibsCbsCst + options.ibsCbsClassCode) or from nothing — then the item goes out without the group, as it always did.

FieldRequiredValues
options.ibsCbsCst, options.ibsCbsClassCodenothe default classification of this invoice's items: CST (3 digits; 000, 200, 400 or 410) + cClassTrib (6 digits), always together
options.simplesActivityCodenoSimples Nacional only: default activity code of the items — 01, 02, 03, 04 or 90
options.simplesIbsRate, options.simplesCbsRatenoSimples Nacional only: effective IBS and CBS rates under Simples, in %, numbers with up to 4 decimals (0.05, 0.35)

The IBS/CBS assessment regime (tpRegimeIBSCBS) does not come on the request: it lives on the fiscal credential, next to the tax regime. options.ibsCbsRegime is ignored.

"options": { "ibsCbsCst": "000", "ibsCbsClassCode": "000001", "simplesActivityCode": "01", "simplesIbsRate": 0.05, "simplesCbsRate": 0.35 }
Credential's regimeWho has to state it
MEInever: it does not report IBS/CBS
Simples Nacionaloptional until Feb 28, 2027; a legal obligation from Mar 1, 2027. In production SEFAZ only accepts the fields from Dec 14, 2026
Regular regimea legal obligation since Aug 3, 2026; in homologation an invoice without the group answers 400 (SEFAZ already rejects it there)

What goes out per regime, the rates, the dates and what is not issued yet are in Issue an NF-e → IBS and CBS.

The printed coupon (DANFE NFC-e) shows neither IBS nor CBS: the official DANFE NFC-e manual has no such field. The amounts are in the XML and in the lookup by access key. In the POS, where the invoice is issued by itself, IBS/CBS is configured on the terminal and a product's exception lives on the product.

State registration

The NFC-e requires the issuer's state registration (IE). A credential without an IE (an IBS/CBS-only taxpayer) is refused before reaching SEFAZ with NFC-e exige a inscrição estadual do emitente. Sem IE, emita NF-e. — see NF-e without state registration.

Numbering

The invoice number comes from the credential's NFC-e counter for the issuing environment (series 1 to 889 and next number, adjustable in the dashboard). Simultaneous issues with the same credential are queued, one at a time, and never repeat a number. The NFC-e and the NF-e have their own counters, and homologation never changes production.

Response

The API answers 201 with the invoice and SEFAZ's reply. Check status: an invoice refused by SEFAZ also comes back 201, with the reason in reason.

{
  "id": "0193a8f2-6c1e-7b40-9d2a-5e8f1c3b7a90",
  "type": "NFCE",
  "typeName": "NFC-e",
  "status": "AUTHORIZED",
  "accessKey": "29261111222333000181650080000001001079068611",
  "protocol": "129260000000002",
  "reason": "100 - Autorizado o uso da NF-e",
  "invoiceNumber": 100,
  "series": 8,
  "environment": 2,
  "totalAmount": 50,
  "referenceCode": "sale-1042",
  "customerEmail": "[email protected]",
  "credentialName": "Downtown store",
  "credentialUf": "BA",
  "createdAt": "2026-11-15T14:20:06.153Z"
}
statusMeaning
AUTHORIZEDAuthorized by SEFAZ; the invoice has fiscal value. The reason starts with 100 (authorized), 150 (authorized past the deadline) or 120 (authorized with an alert — the alert comes in the same text, after `
REJECTEDRefused; reason has SEFAZ's code and message

The response also carries the signed and the authorized XML, in signedXml and authorizedXml. With a webhook registered under Integração → Webhooks (Integration → Webhooks), Intopays sends the fiscal.create event for every issue. The 80 mm receipt PDF, with the QR code, is at GET /v1/fiscal-invoices/<id>/pdf (see Query invoices). An authorized NFC-e can be cancelled within the state's deadline.

E-mail the invoice

With recipient.email and "options": { "sendEmail": true }, the authorized invoice goes once to the customer, with the PDF and the XML attached, from [email protected]; the Reply-To is the organization owner's e-mail, so the customer's replies reach the store. The owner also gets their own copy ("Nota fiscal emitida", with the same attachments) when the invoice-issued notice is on under Configurações (Settings). To send later, or resend to another address, use POST /v1/fiscal-invoices/<id>/email (Query invoices). The POS does not send e-mail.

No answer from SEFAZ

When SEFAZ answers neither the submission nor the access-key consultation, nobody knows whether the invoice was authorized. The API answers 503, the attempt stays PENDING (with access key, number and signed XML) and no new NFC-e in that environment leaves that credential until SEFAZ answers (the other invoice types and the other environment keep working). Try again later with the same referenceCode: if the pending attempt is resolved within that new call and was authorized, the answer is that invoice, without issuing another. In other cases the API does not prevent two invoices with the same reference: before issuing again, check GET /v1/fiscal-invoices?referenceCode=… (or sync the PENDING invoice) and do not issue again if there is already an AUTHORIZED one. You can also ask for the situation with PATCH /v1/fiscal-invoices/<id>/sync (Query invoices).

Errors

StatusResponseFix
400items[0].cest inválido: o CEST tem 7 dígitos, como texto… / items[0].icmsOrigin inválido… / items[0].icmsRate inválido… / items[0].icmsRate: a alíquota do ICMS só vale no item tributado (CST 00)… / items[0].icmsOrigin: emitente sem inscrição estadual não leva ICMS no item…Fix the item field — see Item taxes
400recipient.email inválido: confira o endereço… / options.sendEmail exige o e-mail do cliente em recipient.email. / options.sendEmail deve ser true ou false.Send a valid e-mail in recipient.email, or sendEmail as true/false
400Informe o tipo da nota (type)… or O tipo de nota "…" não é aceito…Send "type": "NFCE"
400environment deve ser 1 (produção) ou 2 (homologação).Send environment as 1 or 2
400Informe a chave da credencial fiscal no cabeçalho X-Credential-Key.Send the header with the credential's API Key
400Recurso disponível apenas para organizações no Brasil (BRL).The token's organization is in dollars (USD or CAD): invoices exist only for organizations in reais (BRL)
400Credencial fiscal não encontrada para o X-Credential-Key informado.Use the API Key of a credential of this organization
400Informe ao menos um item. or Informe os pagamentos da NFC-e (payments).Send the items and the payments
400payments[0].method inválido… / …use o campo method…Use a method from Payment methods
400Na NFC-e o destinatário aceita o CPF ou CNPJ do consumidor (recipient.document), o nome, o endereço e o e-mail. Campo não aceito: …Remove the field (for example stateRegistration), or issue an NF-e
400recipient.document inválido… / Para identificar o consumidor na NFC-e informe o CPF ou CNPJ em recipient.document… / Endereço do consumidor incompleto… / recipient.street deve ter de 2 a 60 caracteres. (and streetNumber, neighborhood, cityName, complement) / recipient.cityCode: o município 2927408 não é da UF SP. Corrija o código IBGE ou a UF do consumidor.Fix the consumer
400NFC-e acima de R$ 10.000,00 exige o consumidor identificado (rejeição 750 da SEFAZ)…Send recipient.document
400A SEFAZ não aceita o CFOP 6102 na NFC-e (rejeição 725)…, O CFOP … não é aceito na NFC-e de um MEI… and other CFOP messagesUse one of the CFOPs accepted on the NFC-e (MEI: 5102)
400items[0]: o CFOP 5933 é de serviço — a SEFAZ exige o ISSQN no item (rejeição 374)… / items[0]: na NFC-e a SEFAZ só aceita o ISSQN no item com CFOP 5933 (rejeição 374)…Send items[].issqn on the 5933 item, and only there
400NFC-e exige a inscrição estadual do emitente. Sem IE, emita NF-e.Add the IE to the credential, or issue an NF-e
400items[0].ibsCbsCst inválido… / Informe o CST e o cClassTrib do IBS/CBS de items[0] juntos… / O CST … do IBS/CBS ainda não é emitido pela Intopays…Fix the item's classification — see IBS and CBS
400Em homologação a SEFAZ já rejeita a nota do regime normal sem o grupo IBS/CBS (regra UB12-10, rejeição 1115)…Send options.ibsCbsCst and options.ibsCbsClassCode, or the fields on the item; in the POS, fill in the terminal
400options.ibsCbsCst inválido… / Informe o CST e o cClassTrib do IBS/CBS da nota (options) juntos…Fix the options field — see IBS and CBS
400items[0].icmsCst: emitente do Simples Nacional (CRT 1) usa CSOSN… / items[0].icmsCsosn inválido… / items[0].pisCst inválido… / items[0].approximateTaxes inválido…Fix the item field — see Item taxes
400Configure o CSC (ID e token) da credencial fiscal… and similar messagesComplete the credential under Credenciais
400Falha na emissão: …The invoice could not be built or SEFAZ refused the submission; the text has the reason
403This route is for integrations with an organization API token…Use an API token; the site session does not call this route
503A SEFAZ não respondeu; a situação da nota nº … é desconhecida…See No answer from SEFAZ
503A SEFAZ ainda não respondeu sobre a nota nº … (chave de acesso …), enviada antes com esta credencial; nenhuma nota nova pode ser numerada até a situação dela ser conhecida…An earlier NFC-e is still PENDING: try again later or sync that invoice

400 and 503 errors come as { "success": false, "message": "…" }.

Missing something on this page? Contact support from the dashboard and we'll update the docs.