br-nfe-v4
Scenarios
Scenarios attach notes and extensions to a document when its filters match. Read more about scenarios.bill/invoice
bill/invoice
| Tags | Type | Output |
|---|---|---|
| - | standardcredit-notedebit-note | { |
simplified | standardcredit-notedebit-note | { |
Extensions
Fiscal Document Model Code
Code used to identify the fiscal document model. It will be determined automatically by GOBL during normalization according to the scenario definitions.br-nfe-model
br-nfe-model
| Code | Name |
|---|---|
55 | NF-e |
65 | NFC-e |
Buyer Presence Indicator
Indicator of the buyer’s presence at the commercial establishment at the time of the operation. This field is used to classify the type of commercial transaction according to Brazilian tax regulations.br-nfe-presence
br-nfe-presence
| Code | Name |
|---|---|
0 | Not applicable |
1 | In-person operation |
2 | Non-in-person operation, via Internet |
3 | Non-in-person operation, Tele-service |
4 | NFC-e in operation with home delivery |
5 | In-person operation, outside establishment |
9 | Non-in-person operation, others |
Payment Method
Code used to identify the payment method used for the transaction.br-nfe-payment-means
br-nfe-payment-means
| Code | Name |
|---|---|
01 | Cash |
02 | Check |
03 | Credit Card |
04 | Debit Card |
05 | Store Credit |
10 | Food Voucher |
11 | Meal Voucher |
12 | Gift Voucher |
13 | Fuel Voucher |
15 | Bank Slip (Boleto) |
16 | Bank Deposit |
17 | Instant Payment (PIX) |
18 | Bank Transfer, Digital Wallet |
19 | Loyalty Program, Cashback, Virtual Credit |
90 | No Payment |
99 | Others |
CFOP (Fiscal Operations and Services Code)
Four-digit code that classifies the nature of goods movements and service provisions for ICMS purposes in Brazil. The first digit indicates the operation origin/destination (1–3 for entries; 5–7 for exits), and the remaining digits identify the specific type of operation.br-nfe-cfop
br-nfe-cfop
Pattern:
^[1-7]\d{3}$Fiscal Incentive Indicator
Indicates whether a party benefits from a fiscal incentive.br-nfe-fiscal-incentive
br-nfe-fiscal-incentive
| Code | Name |
|---|---|
1 | Has incentive |
2 | Does not have incentive |
Tax Regime Code
Indicates the tax regime that a party is subject to.br-nfe-regime
br-nfe-regime
| Code | Name |
|---|---|
1 | Simples Nacional |
2 | Simples Nacional, Excess |
3 | Normal |
Special Tax Regime Code
Indicates a special tax regime that a party is subject to.br-nfe-special-regime
br-nfe-special-regime
| Code | Name |
|---|---|
1 | Municipal micro-enterprise |
2 | Estimated |
3 | Professional Society |
4 | Cooperative |
5 | Single micro-entrepreneur (MEI) |
6 | Micro-enterprise or Small Business (ME EPP) |
Validation Rules
Validation rules check each struct against a set of assertions and report any failures with a unique code and message. Read more about validation.bill.Invoice
bill.Invoice
| Field | Test | Validation Code / Message |
|---|---|---|
| Invoice |
| GOBL-BR-NFE-V4-BILL-INVOICE-30A note with key ‘reason’ is required to describe the nature of the operation (natOp) |
supplier.tax_id |
| GOBL-BR-NFE-V4-BILL-INVOICE-01Supplier tax ID is required |
supplier.tax_id.code |
| GOBL-BR-NFE-V4-BILL-INVOICE-02Supplier tax ID code is required |
supplier.addresses[*] |
| GOBL-BR-NFE-V4-BILL-INVOICE-03Supplier address must not be empty |
supplier.addresses[*].street |
| GOBL-BR-NFE-V4-BILL-INVOICE-04Supplier address requires a street |
supplier.addresses[*].num |
| GOBL-BR-NFE-V4-BILL-INVOICE-05Supplier address requires a number |
supplier.addresses[*].locality |
| GOBL-BR-NFE-V4-BILL-INVOICE-06Supplier address requires a locality |
supplier.addresses[*].state |
| GOBL-BR-NFE-V4-BILL-INVOICE-07Supplier address requires a state |
supplier.addresses[*].code |
| GOBL-BR-NFE-V4-BILL-INVOICE-08Supplier address requires a postal code |
supplier.ext |
| GOBL-BR-NFE-V4-BILL-INVOICE-09Supplier requires ‘br-ibge-municipality’ extension when addresses are present |
supplier.name |
| GOBL-BR-NFE-V4-BILL-INVOICE-10Supplier name is required |
supplier.addresses |
| GOBL-BR-NFE-V4-BILL-INVOICE-11Supplier must have at least one address |
customer |
| GOBL-BR-NFE-V4-BILL-INVOICE-12Customer is required for NF-e invoices |
customer.addresses |
| GOBL-BR-NFE-V4-BILL-INVOICE-13Customer must have at least one address for NF-e invoices |
customer.tax_id |
| GOBL-BR-NFE-V4-BILL-INVOICE-14Customer tax ID is required |
customer.tax_id.code |
| GOBL-BR-NFE-V4-BILL-INVOICE-15Customer tax ID code is required |
customer.addresses[*] |
| GOBL-BR-NFE-V4-BILL-INVOICE-16Customer address must not be empty |
customer.addresses[*].street |
| GOBL-BR-NFE-V4-BILL-INVOICE-17Customer address requires a street |
customer.addresses[*].num |
| GOBL-BR-NFE-V4-BILL-INVOICE-18Customer address requires a number |
customer.addresses[*].locality |
| GOBL-BR-NFE-V4-BILL-INVOICE-19Customer address requires a locality |
customer.addresses[*].state |
| GOBL-BR-NFE-V4-BILL-INVOICE-20Customer address requires a state |
customer.addresses[*].code |
| GOBL-BR-NFE-V4-BILL-INVOICE-21Customer address requires a postal code |
customer.ext |
| GOBL-BR-NFE-V4-BILL-INVOICE-22Customer requires ‘br-ibge-municipality’ extension when addresses are present |
series |
| GOBL-BR-NFE-V4-BILL-INVOICE-23Series is required |
series |
| GOBL-BR-NFE-V4-BILL-INVOICE-24Series format is invalid; must be 0 or 1-999 |
tax |
| GOBL-BR-NFE-V4-BILL-INVOICE-25Tax is required |
tax.ext |
| GOBL-BR-NFE-V4-BILL-INVOICE-26Tax requires ‘br-nfe-model’ and ‘br-nfe-presence’ extensions |
tax.ext |
| GOBL-BR-NFE-V4-BILL-INVOICE-27NF-e invoices do not support ‘4’ for ‘br-nfe-presence’ |
tax.ext |
| GOBL-BR-NFE-V4-BILL-INVOICE-28NFC-e invoices require in-person or delivery for ‘br-nfe-presence’ |
notes[*].text |
| GOBL-BR-NFE-V4-BILL-INVOICE-29Reason note text must be between 1 and 60 characters |
payment |
| GOBL-BR-NFE-V4-BILL-INVOICE-31Payment is required when invoice is unpaid |
payment.instructions |
| GOBL-BR-NFE-V4-BILL-INVOICE-32Payment instructions are required when invoice is unpaid |
totals.dueCalculated |
| GOBL-BR-NFE-V4-BILL-INVOICE-33Due amount must not be negative |
bill.Line
bill.Line
| Field | Test | Validation Code / Message |
|---|---|---|
| Line |
| GOBL-BR-NFE-V4-BILL-LINE-01Line taxes must include the ICMS category |
| Line |
| GOBL-BR-NFE-V4-BILL-LINE-02Line taxes must include the PIS category |
| Line |
| GOBL-BR-NFE-V4-BILL-LINE-03Line taxes must include the COFINS category |
pay.Instructions
pay.Instructions
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-BR-NFE-V4-PAY-INSTRUCTIONS-01Payment instructions require ‘br-nfe-payment-means’ extension |
pay.Advance
pay.Advance
| Field | Test | Validation Code / Message |
|---|---|---|
ext |
| GOBL-BR-NFE-V4-PAY-ADVANCE-01Payment advance requires ‘br-nfe-payment-means’ extension |