Why must an e-invoice be validated before sending?
A PDF invoice is checked by eye, but an e-invoice is processed by software that does not recognise an “almost correct” file. If a mandatory field is empty or the amounts do not match, the recipient's system may reject the file, and the invoice's payment term starts running late from the outset. If the invoice is meant for a public body, a mistake can also delay submission to VID.
Validation before sending costs seconds, but finding a mistake after the customer objects means a credit note and a new invoice. That is why good practice is to validate every file, not just the first few.
What do XSD and the business rules each check?
Validation takes place at two levels, and each catches a different kind of error.
| Level | What it checks | Example of an error |
|---|---|---|
| XSD schema (UBL) | Whether the XML structure is valid: element names, order, data types | A date in the wrong format; a mandatory element is missing |
| EN 16931 business rules | Whether the data is logically consistent with the European e-invoice standard | Line amounts do not add up to the total; a VAT category is missing |
| PEPPOL BIS Billing 3.0 rules | Additional requirements for the PEPPOL network | No buyer electronic address; no exemption reason |
Which errors does validation catch most often?
In practice, most errors are a missing address, a wrong VAT category and amounts that do not match. The most common examples:
- the buyer's e-address or PEPPOL identifier is missing or entered with the wrong scheme;
- totals and VAT do not match the calculation from the lines because amounts were rounded in different ways;
- the wrong VAT category for 0% or reverse-charge transactions;
- no reason given for a VAT exemption or for not charging VAT;
- a credit note does not refer to the invoice being corrected;
- the seller's or buyer's registration or VAT number is missing.
Example: how a mismatch between lines and total stops an e-invoice
Take an invoice with two lines: €600.00 and 3 × €50.00 = €150.00, VAT at 21%. The correct figures are €750.00 excluding VAT, VAT of €157.50 and a total of €907.50. If a program rounds the VAT on each line separately and enters a different figure in the total, for example €157.49, the line and tax amounts no longer match, and the business-rule check flags it as an error.
The fix does not have to be hunted for in the XML file: correct the invoice data or the amount calculation logic and generate the file again. Because the PDF and the XML must be built from the same figures, both change after the correction. This is an illustrative example; the amounts are fictitious.
What do the results mean: passed, error, not validated?
A validation result has to be honest. The recommended interpretation:
| Result | What it means | What to do |
|---|---|---|
| Passed | The file complies with both the schema and the rules | It can be sent |
| Warning | No rules are broken, but the data may raise questions | Review it and correct it if necessary |
| Fatal error | The file fails a mandatory requirement | Do not send; correct the source data |
| Not validated | Validation has not been carried out, or the invoice was changed after it | Validate again; do not send on the assumption that it passed |
How is an e-invoice validated in Finolto?
Finolto validates an e-invoice against the UBL XML schema (XSD) and the official EN 16931 (CEN) and OpenPEPPOL BIS Billing 3.0 business rules (Schematron), run with Saxon on Java; validation takes about a second. Before that, the software lists the data the invoice is missing: the electronic address, the reason for 0%, exempt or reverse-charge lines, and the invoice that a credit note corrects. An invoice with such gaps is not sent.
The result is stored together with the SHA-256 fingerprint of the exact XML. If the invoice has been changed after validation, the software shows “not yet validated” rather than an old result. “Could not be validated” is never treated as “passed”, and a fatal finding blocks sending. For a product overview, see how Finolto creates e-invoices.
How do you fix the errors that validation finds?
An error message usually names the rule and the place in the file, but the fix has to be made in the source data, not in the XML itself. If the buyer's address is missing, complete the partner record; if a reason is missing, add it to the line; if the amounts do not match, check the line prices, quantities and VAT rates. After the fix, the file has to be generated and validated again.
If a mistake is found only after sending, do not correct the invoice by rewriting the file: issue a credit note that refers to the original invoice and, if necessary, a new correct invoice. If the data has already been submitted to VID, the corrections must follow the same procedure.
- Read the error messageFind out which rule was broken and which part of the invoice it relates to.
- Find the source dataThe partner record, the invoice line, the VAT category or the exemption reason.
- Fix it and generate the file againDo not edit anything in the XML file by hand.
- Validate againMake sure the result refers to the new file.
Checklist: what to check before sending
- Do the buyer's name, registration number and VAT number match the register data?
- Is the buyer's e-address or PEPPOL identifier given?
- Does every line have a quantity, unit of measure, price excluding VAT and VAT category?
- Do the 0%, reverse-charge and exempt lines have a reason?
- Do the line amounts, the VAT by rate and the total agree?
- Was validation run after the very latest changes?
- Does a credit note refer to the invoice it corrects?
Does passing validation guarantee that the invoice is correct?
No. Validation checks form and logic, not the substance of the transaction: it cannot see whether the right VAT rate was chosen for a particular transaction or whether the buyer's details are right. A human check therefore remains necessary, especially for VAT categories, exemptions and the reverse charge. For rates, see the overview of VAT rates.
A small business often has no accountant to review every file, so automatic validation replaces part of the daily control. It is not needed only by those who invoice the public sector: even a voluntarily sent e-invoice can be rejected if the customer's system is strict. If you issue only a few invoices and your customers do not ask for e-invoices, you can carry on with PDF for B2B transactions until 2028; check the current rules on the VID website, the Ministry of Finance website and likumi.lv.
This is general information, not legal or tax advice. For submission to VID, see submitting an e-invoice to VID, and for correcting an invoice that has been issued, see e-invoice errors and credit notes.
Frequently asked questions
What is e-invoice validation?
It is the automatic checking of an XML file against defined requirements: first against the XSD schema, which checks the structure, then against the EN 16931 and PEPPOL business rules, which check the content and logic. The aim is to catch missing fields and mismatched amounts before sending, while they can still be fixed.
Read the full answer →Can an e-invoice be validated free of charge?
Many PEPPOL and EN 16931 validation tools are publicly available, and the standard rules are open. Check the pages of the individual providers for specific tools and their availability. Finolto runs validation inside the software before sending, so the file does not have to be uploaded to an external service.
Read the full answer →Why was my e-invoice rejected even though the PDF was correct?
A PDF and an XML are different documents: a PDF is read by a person, while an XML is processed by software with strict rules. The most common reasons are a missing buyer e-address, the wrong VAT category, a missing exemption reason or amounts that do not match. Read the error message, correct the source data and generate the file again.
Read the full answer →Is XSD validation enough?
No. XSD checks only the structure and data types of the file; it does not detect that the line amounts do not match the total or that a field required by PEPPOL is missing. A full check also needs the EN 16931 and PEPPOL BIS Billing 3.0 business rules (Schematron).
Read the full answer →What should I do if I changed the e-invoice after validation?
Validation applies to a specific file. If the invoice or its data is changed afterwards, the old result no longer holds and validation must be run again. Finolto flags this as “not yet validated”, because the result is tied to the SHA-256 fingerprint of the XML.
Read the full answer →Does VID also validate e-invoices?
VID receives the e-invoice data and may reject it if the structure or content does not meet the requirements. It is therefore best to validate it yourself before sending. For VID's exact validation and error-handling procedure, see the VID website and the relevant Cabinet Regulations.
Read the full answer →