XRechnung (Germany)
BR-DE-17
Invoice type code (BT-3) restricted
What it means
XRechnung restricts the document type code (BT-3): allowed values are 326 (partial invoice), 380 (commercial invoice), 384 (corrected invoice), 389 (self-billed invoice), 381 (credit note), and 875/876/877 (construction-specific).
How to fix it
Set cbc:InvoiceTypeCode (or CreditNoteTypeCode 381) to one of the allowed values; 380 for a normal invoice, 384 for a correction (then add the preceding-invoice reference), 381 for a credit note.
Catch this before it reaches the receiving authority:
# CLI
npx @eleata/validate-einvoice validate invoice.xml --format xrechnung-ubl
# GitHub Action — fail the build on any invalid invoice
- uses: hernaninverso/validate-einvoice-action@v1
with:
files: invoices/**/*.xml
api-key: ${{ secrets.EINVOICE_API_KEY }}