Build NAV Online Számla invoiceData XML (OSA 3.0)
Skill: Convert invoice data into the NAV Online Invoice invoiceData XML
Region: Hungary (Magyarország)
Category: Online Számla — NAV real-time invoice data reporting
Does: Takes ordinary invoice data and produces the invoiceData XML that is reported to NAV through the Online Számla system (base64-encoded inside a manageInvoice request).
Schema version: Online Invoice 3.0 (mandatory since 2025)
The
invoiceDataXML is base64-encoded and placed in theinvoiceOperation/invoiceDataelement of amanageInvoicerequest, which is signed with the technical user's request signature. This skill builds theinvoiceDatapayload; it does not cover the technical-user auth/signature handshake. Validate against the official OSA 3.0invoiceData.xsdbefore reporting.
Input data required
| Input | Used for |
|---|---|
| Invoice number, issue date | invoiceNumber, invoiceIssueDate |
| Supplier Hungarian tax number (11 digits), name, address | supplierInfo |
| Customer VAT status, tax number (if domestic), name, address | customerInfo |
| Currency, exchange rate (if not HUF), payment method/date | invoiceDetail |
| Line items: description, quantity, unit, net unit price, VAT rate | invoiceLines |
| Net / VAT / gross totals per rate | invoiceSummary |
The Hungarian tax number splits into taxpayerId (8 digits) + vatCode (1 digit) + countyCode (2 digits).
Namespaces
| Prefix | URI |
|---|---|
default (data) |
http://schemas.nav.gov.hu/OSA/3.0/data |
base |
http://schemas.nav.gov.hu/OSA/3.0/base |
Root element: <InvoiceData xmlns="http://schemas.nav.gov.hu/OSA/3.0/data" xmlns:base="http://schemas.nav.gov.hu/OSA/3.0/base">.
Document structure to emit
InvoiceData
├── invoiceNumber
├── invoiceIssueDate
├── completenessIndicator (false unless the XML itself is the e-invoice)
└── invoiceMain
└── invoice
├── invoiceHead
│ ├── supplierInfo (supplierTaxNumber, supplierName, supplierAddress, bank account)
│ ├── customerInfo (customerVatStatus, customerVatData, customerName, customerAddress)
│ └── invoiceDetail (invoiceCategory, invoiceDeliveryDate, currencyCode, exchangeRate, paymentMethod, paymentDate, invoiceAppearance)
├── invoiceLines (mergedItemIndicator + line[])
└── invoiceSummary (summaryNormal: summaryByVatRate[] + invoiceNetAmount + invoiceVatAmount; summaryGrossData)
supplierInfo / customerInfo tax number
<supplierTaxNumber>
<base:taxpayerId>12345678</base:taxpayerId>
<base:vatCode>2</base:vatCode>
<base:countyCode>42</base:countyCode>
</supplierTaxNumber>
customerInfo/customerVatStatus is one of DOMESTIC, OTHER, PRIVATE_PERSON. For a domestic VAT-registered buyer use DOMESTIC and supply customerVatData/customerTaxNumber.
invoiceDetail key fields
| Element | Value |
|---|---|
invoiceCategory |
NORMAL, SIMPLIFIED, or AGGREGATE |
invoiceDeliveryDate |
fulfilment date |
currencyCode |
e.g. HUF |
exchangeRate |
required when currency ≠ HUF (HUF/unit) |
paymentMethod |
TRANSFER, CASH, CARD, VOUCHER, OTHER |
invoiceAppearance |
PAPER, ELECTRONIC, EDI, UNKNOWN |
line (per item)
| Element | Meaning |
|---|---|
lineNumber |
1-based |
lineDescription |
item text |
quantity / unitOfMeasure |
quantity + unit (PIECE, HOUR, KILOGRAM, OWN …) |
unitPrice |
net unit price |
lineAmountsNormal/lineNetAmountData/lineNetAmount |
line net (HUF) |
lineAmountsNormal/lineVatRate/vatPercentage |
rate as a fraction (0.27 = 27%) |
lineAmountsNormal/lineGrossAmountData/lineGrossAmountNormal |
line gross |
invoiceSummary
summaryNormal contains one summaryByVatRate per rate (vatRate/vatPercentage, vatRateNetData/vatRateNetAmount, vatRateVatData/vatRateVatAmount), plus invoiceNetAmount and invoiceVatAmount. summaryGrossData/invoiceGrossAmount holds the gross total.
Calculation rules
- VAT rates are expressed as decimal fractions: 27% →
0.27, 18% →0.18, 5% →0.05, 0% →0. - Line net = quantity × net unit price; line VAT = net × rate; line gross = net + VAT.
summaryByVatRateper rate: net = Σ line nets at that rate; VAT = Σ line VAT at that rate.invoiceNetAmount= Σ rate nets;invoiceVatAmount= Σ rate VAT;invoiceGrossAmount= net + VAT.- For foreign currency, also report the HUF-converted amounts where the schema requires (
*HUFfields) usingexchangeRate. - Hungarian standard VAT rate is 27%.
Worked example (single 27% line, HUF)
<?xml version="1.0" encoding="UTF-8"?>
<InvoiceData xmlns="http://schemas.nav.gov.hu/OSA/3.0/data"
xmlns:base="http://schemas.nav.gov.hu/OSA/3.0/base">
<invoiceNumber>2024-001</invoiceNumber>
<invoiceIssueDate>2024-01-15</invoiceIssueDate>
<completenessIndicator>false</completenessIndicator>
<invoiceMain>
<invoice>
<invoiceHead>
<supplierInfo>
<supplierTaxNumber>
<base:taxpayerId>12345678</base:taxpayerId><base:vatCode>2</base:vatCode><base:countyCode>42</base:countyCode>
</supplierTaxNumber>
<supplierName>Acme Kft.</supplierName>
<supplierAddress><base:simpleAddress>
<base:countryCode>HU</base:countryCode><base:postalCode>1011</base:postalCode><base:city>Budapest</base:city><base:additionalAddressDetail>Fő utca 1.</base:additionalAddressDetail>
</base:simpleAddress></supplierAddress>
</supplierInfo>
<customerInfo>
<customerVatStatus>DOMESTIC</customerVatStatus>
<customerVatData><customerTaxNumber>
<base:taxpayerId>87654321</base:taxpayerId><base:vatCode>2</base:vatCode><base:countyCode>02</base:countyCode>
</customerTaxNumber></customerVatData>
<customerName>Ügyfél Zrt.</customerName>
<customerAddress><base:simpleAddress>
<base:countryCode>HU</base:countryCode><base:postalCode>7621</base:postalCode><base:city>Pécs</base:city><base:additionalAddressDetail>Király utca 7.</base:additionalAddressDetail>
</base:simpleAddress></customerAddress>
</customerInfo>
<invoiceDetail>
<invoiceCategory>NORMAL</invoiceCategory>
<invoiceDeliveryDate>2024-01-15</invoiceDeliveryDate>
<currencyCode>HUF</currencyCode>
<paymentMethod>TRANSFER</paymentMethod>
<paymentDate>2024-01-29</paymentDate>
<invoiceAppearance>ELECTRONIC</invoiceAppearance>
</invoiceDetail>
</invoiceHead>
<invoiceLines>
<mergedItemIndicator>false</mergedItemIndicator>
<line>
<lineNumber>1</lineNumber>
<lineDescription>Programozási szolgáltatás</lineDescription>
<quantity>40</quantity><unitOfMeasure>HOUR</unitOfMeasure><unitPrice>25000</unitPrice>
<lineAmountsNormal>
<lineNetAmountData><lineNetAmount>1000000</lineNetAmount></lineNetAmountData>
<lineVatRate><vatPercentage>0.27</vatPercentage></lineVatRate>
<lineVatData><lineVatAmount>270000</lineVatAmount></lineVatData>
<lineGrossAmountData><lineGrossAmountNormal>1270000</lineGrossAmountNormal></lineGrossAmountData>
</lineAmountsNormal>
</line>
</invoiceLines>
<invoiceSummary>
<summaryNormal>
<summaryByVatRate>
<vatRate><vatPercentage>0.27</vatPercentage></vatRate>
<vatRateNetData><vatRateNetAmount>1000000</vatRateNetAmount></vatRateNetData>
<vatRateVatData><vatRateVatAmount>270000</vatRateVatAmount></vatRateVatData>
</summaryByVatRate>
<invoiceNetAmount>1000000</invoiceNetAmount>
<invoiceVatAmount>270000</invoiceVatAmount>
</summaryNormal>
<summaryGrossData><invoiceGrossAmount>1270000</invoiceGrossAmount></summaryGrossData>
</invoiceSummary>
</invoice>
</invoiceMain>
</InvoiceData>
Validation checklist
- OSA 3.0
dataandbasenamespaces set on the root - Supplier (and domestic customer) tax number split into taxpayerId / vatCode / countyCode
-
customerVatStatuscorrect (DOMESTIC/OTHER/PRIVATE_PERSON) - VAT rates expressed as decimal fractions (0.27, not 27)
-
exchangeRatepresent when currency ≠ HUF -
summaryByVatRateper rate reconciles with line amounts; net + VAT = gross - Validated against the official OSA 3.0
invoiceData.xsd - Base64-encoded into the
manageInvoicerequest and signed before reporting to NAV
Last updated: 2026-05-26 — verify element names, enums, and the schema version against the current NAV Online Számla 3.0 documentation (onlineszamla.nav.gov.hu) before use.