XRechnung 3.0 Credit Note (UBL)
A German XRechnung credit note in UBL syntax, checked against the UBL 2.1 CreditNote schema, the EN 16931 rules and the XRechnung rules (BR-DE-*).
About
The credit note of XRechnung, the German CIUS of EN 16931: UBL's CreditNote document with type code 381, checked with the same rule layers as the XRechnung invoice. In CII, a credit note is a CrossIndustryInvoice with that type code, so the XRechnung CII entry covers both.
E-invoicing in Germany: the rules in short and how to check an invoice →
Good to know
- Rules run only when the document matches the schema. Documents over 50 MB are checked against the schema only.
- Rule levels follow the KoSIT validator configuration (2026-08-31) for the credit note scenarios (XRechnung and CVD): a few code list rules are warnings there. Its "information" level is shown as a warning.
- The XRechnung test suite has no UBL credit note, so the example is its invoice 01.02a (KoSIT, Apache License 2.0) turned into a credit note by us; the KoSIT validator accepts it.
Files
14 files · 2.7 MB-
maindoc/UBL-CreditNote-2.1.xsd main
-
common/UBL-CommonAggregateComponents-2.1.xsd
-
common/UBL-CommonBasicComponents-2.1.xsd
-
common/UBL-CommonExtensionComponents-2.1.xsd
-
common/UBL-QualifiedDataTypes-2.1.xsd
-
common/UBL-UnqualifiedDataTypes-2.1.xsd
-
common/UBL-ExtensionContentDataType-2.1.xsd
-
common/CCTS_CCT_SchemaModule-2.1.xsd
-
common/UBL-CommonSignatureComponents-2.1.xsd
-
common/UBL-SignatureAggregateComponents-2.1.xsd
-
common/UBL-SignatureBasicComponents-2.1.xsd
-
common/UBL-xmldsig-core-schema-2.1.xsd
-
common/UBL-XAdESv132-2.1.xsd
-
common/UBL-XAdESv141-2.1.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published.
Business rules
Schematron · run in this orderThe rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.
Example document
xrechnung-creditnote-ubl.xml · 6.8 KB · passes the schema and the rules
In CI and from code
The same schema by its name, xrechnung-3-ubl-credit-note, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema xrechnung-3-ubl-credit-note
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: xrechnung-3-ubl-credit-note
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document={{ $schema->example ?? 'document.xml' }} -F schema=xrechnung-3-ubl-credit-note
Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups