Skip to main content

Invoice Schema

The invoice schema below is the NRS (National Revenue Service) standard required for FIRS e-invoicing compliance. All invoices submitted through the Heirs E-Invoicing Middleware must conform to this structure. Fields are organised into six sections.


Invoice Header

FieldTypeMax LengthRequiredDescription
business_idString36YesBusiness UUID
irnString50YesInvoice Reference Number
invoice_kindString3YesInvoice nature: B2B, B2C, or B2G
issue_dateDate (YYYY-MM-DD)10YesInvoice issue date
due_dateDate (YYYY-MM-DD)10YesInvoice due date
issue_timeTime (HH:mm:ss)8YesInvoice issue time
invoice_type_codeString10YesInvoice type code
tax_point_dateDate (YYYY-MM-DD)10YesTax point date
document_currency_codeString3YesDocument currency
tax_currency_codeString3YesTax currency
billing_reference[].irnString50Credit notes onlyOriginal invoice IRN
billing_reference[].issue_dateDate (YYYY-MM-DD)10Credit notes onlyOriginal invoice issue date

Supplier Information (accounting_supplier_party)

FieldTypeMax LengthRequiredDescription
party_nameString100YesSupplier name
tinString20YesSupplier TIN
emailString100YesSupplier email
telephoneString20YesSupplier phone
business_descriptionString255NoBusiness description
postal_address.street_nameString150YesStreet name
postal_address.city_nameString100YesCity
postal_address.postal_zoneString20NoPostal code
postal_address.countryString2YesCountry code (ISO 3166-1 alpha-2)

Customer Information (accounting_customer_party)

Only included when a customer TIN is provided. Minimum TIN length is 5 characters.

FieldTypeMax LengthRequiredDescription
party_nameString100YesCustomer name
tinString20YesCustomer TIN (min 5 characters)
emailString100YesCustomer email
telephoneString20YesCustomer phone
business_descriptionString255NoBusiness description
postal_address.street_nameString150NoStreet name
postal_address.city_nameString100YesCity
postal_address.postal_zoneString20NoPostal code
postal_address.countryString2YesCountry code (ISO 3166-1 alpha-2)

Invoice Line Items (invoice_line[])

An array — one entry per product or service billed.

FieldTypeRequiredDescription
hsn_codeStringYesProduct classification code
product_categoryStringYesProduct category
invoiced_quantityDecimalYesQuantity
line_extension_amountDecimalYesLine total amount
discount_rateDecimalNoDiscount rate
discount_amountDecimalNoDiscount amount
fee_rateDecimalNoFee rate
fee_amountDecimalNoFee amount
item.nameStringYesItem name
item.descriptionStringNoItem description
item.sellers_item_identificationStringYesItem ID
price.price_amountDecimalYesUnit price
price.base_quantityDecimalYesBase quantity
price.price_unitStringYesPrice unit

Tax Structure (tax_total[])

FieldTypeRequiredDescription
tax_amountDecimalYesTotal tax amount
tax_subtotal[].taxable_amountDecimalYesTaxable amount
tax_subtotal[].tax_amountDecimalYesTax amount for this category
tax_subtotal[].tax_category.idStringYesTax category (e.g. STANDARD_VAT, ZERO_VAT)
tax_subtotal[].tax_category.percentDecimalYesTax rate (%)

FieldTypeRequiredDescription
line_extension_amountDecimalYesSum of all line amounts
tax_exclusive_amountDecimalYesTotal before tax
tax_inclusive_amountDecimalYesTotal after tax
payable_amountDecimalYesFinal payable amount