Fields of the XRechnung: buyer reference, order number, discount, early payment discount, attachment
In the XRechnung (the German standard for electronic invoices), every detail has a fixed field with an identifier from the standard EN 16931, for example BT-10 for the buyer reference. We built a sample invoice with order number, discount, early payment discount and PDF attachment that the KoSIT validator accepted without a single message. This page shows where each detail belongs and which error appears if it is missing.
Written by Marwan Saleh (Development). As of 21 November 2026. Sample invoice created and checked by us. Technical explanation, not tax advice.
The most important fields and what happens if they are missing
| Detail | In the file | Missing or wrong |
|---|---|---|
| Invoice number (BT-1) | <cbc:ID>RE-2027-0042</cbc:ID> | Schema: cvc-complex-type.2.4.a |
| Invoice date (BT-2) | <cbc:IssueDate>2027-01-15</cbc:IssueDate> | Schema, wrong format: cvc-datatype-valid |
| Invoice type (BT-3) | <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode> | BR-CL-01 |
| Currency (BT-5) | <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode> | BR-05 |
| Buyer reference (BT-10) | <cbc:BuyerReference>K-1001</cbc:BuyerReference> | BR-DE-15 |
| Order number (BT-13) | <cac:OrderReference><cbc:ID>B-2027-117</cbc:ID></cac:OrderReference> | optional |
| Seller electronic address (BT-34) | <cbc:EndpointID schemeID="EM">…</cbc:EndpointID> | PEPPOL-EN16931-R020 |
| Seller VAT ID (BT-31) | <cbc:CompanyID>DE123456789</cbc:CompanyID> | BR-DE-16, BR-CO-09 |
| Contact person (BG-6) | <cac:Contact> name, phone, email </cac:Contact> | BR-DE-2, BR-DE-6, BR-DE-7 |
| Buyer name (BT-44) | <cbc:RegistrationName>Beispiel Bau GmbH</cbc:RegistrationName> | BR-07 |
| Payment instructions (BG-16) | <cac:PaymentMeans> code 58, IBAN </cac:PaymentMeans> | BR-DE-1, warning BR-DE-19 |
| Early payment discount (in BT-20) | #SKONTO#TAGE=14#PROZENT=2.00# | BR-DE-18 |
| Discount at invoice level (BG-20) | <cac:AllowanceCharge> false, 10.00 </cac:AllowanceCharge> | Totals: BR-CO-13 |
| Attachment (BG-24) | <cac:AdditionalDocumentReference> … PDF … </cac:AdditionalDocumentReference> | BR-DE-22 for duplicate file names |
Each error code has its own explanation with a reproduced validation run: Understanding and fixing XRechnung errors.
Discount, early payment discount and attachment in the sample invoice
Compared with our simple example invoice, the sample invoice has four additions. The totals are recalculated accordingly: €10.00 loyalty discount on the 19% portion, net €405.80, tax €67.53, gross €473.33.
| Addition | How it appears in the file |
|---|---|
| Order number | <cac:OrderReference><cbc:ID>B-2027-117</cbc:ID></cac:OrderReference> |
| Attachment | <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="lieferschein-LS-0815.pdf"> |
| Discount | <cbc:ChargeIndicator>false</cbc:ChargeIndicator> … <cbc:Amount currencyID="EUR">10.00</cbc:Amount> |
| Early payment discount | <cbc:Note>#SKONTO#TAGE=14#PROZENT=2.00#⏎</cbc:Note> |
File and report for checking
Sample invoice (XML) and Validation report: accepted, 0 messages. All companies, numbers and the IBAN are made up; the attachment is a blank sample page.
If your software does not provide these fields
Often fields such as buyer reference or contact person are not missing in the invoice but already in the data of the shop or program. Then the source has to be extended, not just the output. gotakt takes care of this: E-invoicing from shop and software, feasibility check €290 net.
Frequently asked questions
What do I enter in the buyer reference (BT-10)?
For public authorities, the Leitweg-ID (the routing ID of the authority). For business customers, the reference the customer asks for, for example an order or customer number. The field is mandatory in the XRechnung; if it is empty, the validator rejects the file with BR-DE-15.
Where does the customer's order number go?
In cac:OrderReference with cbc:ID (Purchase order reference, BT-13). In our sample invoice it says B-2027-117 there, in addition to the buyer reference.
How do I write an early payment discount (Skonto) into an XRechnung?
In the payment terms as the line #SKONTO#TAGE=14#PROZENT=2.00# followed by a line break. The validator rejects other spellings with BR-DE-18; we tested this.
How do I state a discount?
As an allowance with cac:AllowanceCharge and ChargeIndicator false, with reason, amount and tax category. Not as a line with a negative price; the validator rejects that with BR-27.
Can I attach a PDF to the XRechnung?
Yes, as an embedded document in cac:AdditionalDocumentReference, with file name and MIME type. Our sample invoice contains a delivery note as a PDF in this way and was accepted. File names must be unique (BR-DE-22).
May an XRechnung be created without a VAT ID?
For lines taxed at the normal rate, the XRechnung requires the seller's VAT ID or tax number. If both are missing, four errors appear at once, including BR-DE-16.
How do I send an XRechnung?
Between companies, email is usually enough. Since XRechnung 3.0, the electronic addresses of seller and buyer are mandatory details in the file. Public authorities specify their own channels.
Sources
- KoSIT: Validator configuration XRechnung. Release v2026-08-31 with XRechnung 3.0.2, rules BR-DE-15, BR-DE-18, BR-DE-22
- KoSIT: Validator. Version 1.6.3, sample invoice checked on 21 November 2026
- Federal Ministry of Finance: questions and answers on e-invoicing (in German)
As of 21 November 2026. Technical explanation, not tax advice.


