Brazil NF-e Field Reference (Model 55)
Brazil's NF-e is an XML invoice authorized by the state tax authority before goods can move. Localization projects live or die on field mapping, so this table lists the main tags, what they mean and what the ERP has to supply.
| XML tag | Group | Meaning | Values and ERP note |
|---|---|---|---|
ide/cUF | Identification | IBGE code of the issuer state | Two digits; first part of the access key |
ide/natOp | Identification | Nature of the operation | Free text such as sale or return; ERP usually maps from the operation type |
ide/mod | Identification | Fiscal document model | 55 for NF-e, 65 for NFC-e |
ide/serie | Identification | Document series | Part of the numbering sequence; one sequence per series and issuer |
ide/nNF | Identification | Invoice number | Sequential per series; gaps must be handled by number inutilization |
ide/dhEmi | Identification | Issue date and time with UTC offset | Must be within the allowed window of the authorization time |
ide/tpNF | Identification | Operation type | 0 inbound (entrada), 1 outbound (saida) |
ide/idDest | Identification | Destination of the operation | 1 internal, 2 interstate, 3 foreign; drives CFOP first digit |
ide/tpEmis | Identification | Issuance type | 1 normal; other values are contingency modes |
ide/finNFe | Identification | Invoice purpose | 1 normal, 2 complementary, 3 adjustment, 4 return |
ide/indFinal | Identification | Final consumer indicator | 0 normal, 1 final consumer; affects tax treatment |
ide/indPres | Identification | Buyer presence indicator | Required; 0 not applicable, 1 in person, 2 internet, and others |
ide/chNFe (infNFe Id) | Identification | Access key (chave de acesso) | 44 digits: state, year-month, issuer CNPJ, model, series, number, issuance type, numeric code, check digit |
emit/CNPJ | Issuer | Issuer tax ID | 14 digits; CPF used instead for individuals |
emit/IE | Issuer | State registration | Issuer's state tax registration number |
emit/CRT | Issuer | Tax regime code | 1 Simples Nacional, 2 Simples excess of sublimit, 3 normal regime |
dest/CNPJ or CPF | Recipient | Recipient tax ID | CNPJ for companies, CPF for individuals, ID for foreigners |
dest/indIEDest | Recipient | State registration indicator of the recipient | 1 taxpayer, 2 exempt, 9 non-taxpayer; changes ICMS rules |
dest/enderDest | Recipient | Recipient address | City uses the IBGE municipality code |
det/@nItem | Item | Item sequence | 1 to 990 lines per invoice |
det/prod/cProd | Item | Product code | Issuer's internal code |
det/prod/xProd | Item | Product description | Text description on the invoice |
det/prod/NCM | Item | Mercosur common nomenclature | 8 digits; drives IPI and other tax rules |
det/prod/CFOP | Item | Fiscal operation code | 4 digits; first digit 5 internal, 6 interstate, 7 foreign sales |
det/prod/uCom | Item | Commercial unit | Unit string such as UN, KG |
det/prod/qCom | Item | Commercial quantity | Up to 4 decimals |
det/prod/vUnCom | Item | Commercial unit value | Up to 10 decimals |
det/prod/vProd | Item | Gross item value | Quantity times unit value, rounded as specified |
det/imposto/ICMS | Taxes | State value-added tax group | CST or CSOSN code selects the sub-group; depends on CRT |
det/imposto/IPI | Taxes | Federal excise on industrial products | Applies mainly to manufacturers and importers |
det/imposto/PIS | Taxes | Federal social contribution | CST selects the calculation form |
det/imposto/COFINS | Taxes | Federal social contribution | Mirrors PIS structure with its own CST |
total/ICMSTot/vBC | Totals | ICMS tax base total | Must equal sum of item bases |
total/ICMSTot/vNF | Totals | Total invoice value | Validated against the sum of items, freight, insurance, other and taxes |
transp/modFrete | Transport | Freight mode | 0 sender pays, 1 recipient pays, 2 third party, 9 no freight |
cobr/dup | Billing | Installments | Due dates and values for the receivable |
pag/detPag/tPag | Payment | Payment means | Coded payment method; required in the current layout |
infAdic/infCpl | Additional information | Complementary information | Free text used for legal references and notes |
protNFe/infProt/nProt | Authorization | Authorization protocol number | Returned by the tax authority (SEFAZ) when the invoice is authorized |
Layout versions change through technical notes (notas tecnicas) published by the tax authority. This is a working reference for localization and integration, not the official schema. Confirm against the current layout manual before coding.
ERP field mapping help
Optional: we can review your NF-e field mapping or reconciliation approach.
Optional. The tool and every export work without this. No spam.
How to use the table
Use the search box to find a tag or a concept, for example CFOP, CRT or access key. Each row gives the group in the XML, the meaning, and a note on the values or the ERP implication. Export the table to Excel or CSV to build a field mapping sheet between your ERP document model and the NF-e layout. Add columns for your source table and field, owner, and test result.
The access key and numbering
The 44 digit chave de acesso encodes the state, year and month of issue, the issuer CNPJ, the model, series, number, issuance type, a numeric code and a check digit. It is the unique identifier used for lookups, cancellations and events. Because numbers must be sequential per series, any number skipped through a failed or abandoned document has to be formally inutilized, which is a process step to build into the ERP.
Taxes make the project hard
A Brazilian invoice carries several tax groups per line: ICMS, IPI, PIS and COFINS, with ICMS-ST and other state specifics layered on top. The rules depend on the item NCM, the CFOP, the origin and destination states, and the issuer's regime (CRT). Most ERPs use a tax determination engine or a localization add-on for this; the NF-e layout is only the container for its result.
- CFOP and NCM must be on the item master or determined
- CST or CSOSN depends on the issuer regime
- Interstate rates and ICMS-ST depend on the state pair
- Totals must reconcile to the cent with the item values
Common mistakes
Teams copy a sample XML and parameterize it, then find that edge cases such as returns, complementary invoices, exports and transfers use different CFOP and purpose codes. Plan scenarios up front and test each one in the authority's homologation environment. Also plan the events: cancellation, correction letters and manifestation of the recipient are separate messages with their own rules and time windows.
Frequently Asked Questions
What does NF-e model 55 mean?
Model 55 is the electronic invoice used for business to business sales and most goods movements. Model 65 (NFC-e) is the consumer retail version. The model number is a field in the identification group and part of the access key.
How long is the NF-e access key?
It has 44 digits. They encode the state, year and month, issuer CNPJ, model, series, number, issuance type, a numeric code and a check digit, so it can be validated without contacting the authority.
Is this the official layout?
No. It is a practical summary of main fields. The official manual and the technical notes from the tax authority define the exact schema, field lengths and validation rules, and they change over time.
Do I need a local partner?
Most global ERPs need either native localization or a certified Brazilian add-on for tax determination, SPED reporting and NF-e transmission. The decision depends on your ERP and volume; check your vendor's localization support first.
If you are integrating a global ERP with Brazilian NF-e through a local partner, we can help map fields and reconcile authorized invoices back to ERP documents.
Related Tools
Latin America ERP Localization Readiness Assessment
Ten scored questions that show how ready your ERP and processes are for Latin American e-invoicing, tax and reporting before you open a new plant or subsidiary.
Country & TaxMexico CFDI 4.0 Invoice Checklist
Check every CFDI 4.0 field group before your ERP stamps an invoice: issuer, receiver, concepts, taxes, payment method, complements and cancellation.
Developer ToolsCFDI 4.0 XML Skeleton Generator
Fill in a form and get a CFDI 4.0 XML skeleton with the right nodes and attributes, ready to adapt for test stamping with a PAC.
ERP OperationsISO Country and Currency Codes Reference for ERP Master Data
Look up ISO 3166 alpha-2, alpha-3 and numeric country codes with the usual ISO 4217 currency and decimal places.
More Country & Tax tools
See all- Tally Prime Manufacturing Journal Checklist
- Tally Stock Item Import Template (Excel)
- Busy Accounting GST Setup Checklist
- GST Tax Invoice Format Template for Indian Manufacturers
- Delivery Challan Format Template for Goods Movement in India
- Purchase Order Format Template for Indian Manufacturers
- Job Work Challan Register and ITC-04 Worksheet
- TDS Deduction Tracker Worksheet for Vendor Payments
- MSME Vendor Payment Due Date Tracker (45 Day Rule)