XRechnung UBL 2.1 Sample Invoice (valid)
Complete, valid XRechnung XML example in UBL 2.1 format with two line items, 19% VAT, and all mandatory fields per XRechnung 3.0.2 — ready to test with the KoSIT Validator.
About this resource
This sample XML document is a complete, syntactically and semantically valid XRechnung in UBL 2.1 format (invoice type code 380, currency EUR). It contains all mandatory fields per XRechnung specification 3.0.2 (KoSIT) and European standard EN 16931: two invoice lines with different descriptions and quantity units, one tax group at 19% standard rate, complete totals per BG-22, and full supplier and buyer data.
The document is extensively annotated: every element carries a comment with the corresponding Business Term (BT) or Business Group (BG) from EN 16931 and a short explanation. It serves as a starting point for developers integrating XRechnung into their own systems, and as a reference for understanding the UBL document structure.
The sample invoice can be uploaded directly to the KoSIT online validator or to our own validation tool on docutools.pro to confirm it is error-free. It can also be used as a basis for your own tests and customisations.
How to use this template
Download the XML file. Open it in an XML editor or text editor. Adjust the supplier and buyer details, the Leitweg-ID, and the invoice lines to fit your use case. Then validate the result with the KoSIT Validator (https://github.com/itplr-kosit/validator) or directly on docutools.pro.
This resource is provided for informational purposes only. It does not constitute legal, tax, or professional advice. Always consult a qualified tax advisor or lawyer for your specific situation.