How do I validate my XRechnung before sending it?

In short: The authoritative result is the report of the official KoSIT validator with the current XRechnung validation configuration. Many invoice receiving platforms use the same combination. Check your files with it before you send them.

What you need

The validation configuration is updated regularly. Always use the latest version – rules can change, as most recently with CII-SR-465 (German).

Running the validation

java -jar validator-standalone.jar -s configuration\scenarios.xml -r configuration -o report invoice.xml

-s points to the scenarios.xml file of the unpacked configuration, -r to its folder, -o to the output folder for the report. The validator checks XRechnungen in both syntaxes (CII and UBL).

Reading the result

The console shows ACCEPTABLE or REJECT. The report folder contains the detailed report with all messages and their location in the file. Errors lead to rejection, warnings do not.

Common errors

And the SDK's schema check?

ValidateXmlAgainstXsd of the Aloaha ZUGFeRD SDK checks a file against an XSD schema, i.e. only the structure. From version 11.0.0.10, ValidateInvoiceXML and ValidateInvoicePDF also check the business rules (calculation rules, mandatory fields, BR-DE rules) with the published rules of CEN and KoSIT – offline and with plain-language messages, currently as a beta: Validate e-invoices in the SDK. Because the SDK also creates the invoice, still check new kinds of invoices independently with the KoSIT validator.

Frequently asked questions

Which validator is authoritative for the XRechnung?

The official KoSIT validator with the current XRechnung validation configuration. Many invoice receiving platforms use the same combination.

Do warnings lead to rejection?

No. Only errors lead to REJECT; warnings appear in the report but the invoice is still ACCEPTABLE.

Is the XSD schema check of the SDK enough?

ValidateXmlAgainstXsd only checks the structure against the schema. From version 11.0.0.10 the SDK also checks calculation rules, mandatory fields and the German BR-DE rules with ValidateInvoiceXML (beta). For new kinds of invoices, check examples independently with the KoSIT validator as well.