eliDocs
Country Guides

Germany

XRechnung and ZUGFeRD e-invoicing requirements for Germany, with Beliq configuration examples.

Germany mainly uses two EN 16931-based e-invoicing formats:

  • XRechnung — mandatory for many public-sector invoices (B2G) and increasingly used in B2B
  • ZUGFeRD — a PDF invoice with embedded XML data for system processing
Mandate timeline

Mandate timeline

Germany is phasing in mandatory B2B e-invoicing. Receiving a structured invoice is already required; issuing is phased in by prior-year turnover.

DateWhat changes
1 January 2025Every domestic business must be able to receive an EN 16931 e-invoice.
1 January 2027Issuing becomes mandatory for businesses with prior-year turnover above EUR 800,000.
1 January 2028Issuing becomes mandatory for all remaining domestic businesses.

Paper and PDF invoices (with the recipient's consent) and non-conforming EDI stay permitted through 31 December 2027.

Last verified against the German Federal Ministry of Finance (BMF) and the European Commission eInvoicing country page, cross-checked against the June 2026 confirmation that the 2027 date is unchanged on 24 August 2026. Official source.

For the dates Beliq tracks across every covered country, see the mandate calendar.

XRechnung

XRechnung

XRechnung is Germany’s official CIUS profile of EN 16931, maintained by KoSIT. It adds German-specific business rules on top of EN 16931.

Key requirements

Rule Description
Buyer reference (BT-10) Required (BR-DE-15). For B2G this is the “Leitweg-ID” that identifies the receiving government entity
Seller contact (BG-6) Required (BR-DE-2): contact point (BT-41), telephone (BT-42) and email (BT-43)
Electronic addresses (BT-34, BT-49) Required for both parties; Beliq returns 400 when it cannot resolve one. Give each an email, a peppol block, or a vatId with a supported country. A peppol block is the stronger choice when the invoice travels over Peppol, and it is honoured on the CII binding too
Payment instructions (BG-16) Required (BR-DE-1)
Payment means At least one payment means must be specified
VAT identifiers Either vatId (BT-31) or taxId must be provided for the seller

Generating XRechnung invoices

Use standard: "xrechnung" with output: "xml":

generate-xrechnung.sh
curl -X POST https://api.beliq.eu/v1/generate \
  -H "Authorization: Bearer blq_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "standard": "xrechnung",
    "profile": "xrechnung",
    "output": "xml",
    "invoice": {
      "number": "RE-2026-0042",
      "issueDate": "2026-04-13",
      "dueDate": "2026-05-13",
      "currencyCode": "EUR",
      "buyerReference": "04011000-12345-03",
      "seller": {
        "name": "Muster GmbH",
        "vatId": "DE123456789",
        "email": "rechnung@muster.example",
        "contactName": "Klaus Muster",
        "phone": "+49 30 1234567",
        "address": {
          "street": "Hauptstraße 1",
          "city": "Berlin",
          "postalCode": "10115",
          "countryCode": "DE"
        }
      },
      "buyer": {
        "name": "Stadtverwaltung Beispielstadt",
        "email": "eingangsrechnung@beispielstadt.example",
        "address": {
          "city": "Beispielstadt",
          "postalCode": "12345",
          "countryCode": "DE"
        }
      },
      "lines": [
        {
          "description": "Beratungsleistung April 2026",
          "quantity": 40,
          "unitCode": "HUR",
          "unitPrice": 95.00,
          "lineTotal": 3800.00,
          "vatRate": 19,
          "vatCategoryCode": "S"
        }
      ],
      "taxSummary": [
        { "vatCategoryCode": "S", "vatRate": 19, "taxableAmount": 3800.00, "taxAmount": 722.00 }
      ],
      "paymentMeans": {
        "typeCode": "58",
        "iban": "DE89370400440532013000"
      },
      "totalNetAmount": 3800.00,
      "totalTaxAmount": 722.00,
      "totalGrossAmount": 4522.00
    }
  }'
import { Beliq } from '@beliq/sdk';

const beliq = new Beliq({ apiKey: process.env.BELIQ_API_KEY! });

const generated = await beliq.generate({
  standard: 'xrechnung',
  profile: 'xrechnung',
  output: 'xml',
  invoice: {
    number: 'RE-2026-0042',
    issueDate: '2026-04-13',
    dueDate: '2026-05-13',
    currencyCode: 'EUR',
    buyerReference: '04011000-12345-03',
    seller: {
      name: 'Muster GmbH',
      vatId: 'DE123456789',
      email: 'rechnung@muster.example',
      contactName: 'Klaus Muster',
      phone: '+49 30 1234567',
      address: { street: 'Hauptstraße 1', city: 'Berlin', postalCode: '10115', countryCode: 'DE' },
    },
    buyer: {
      name: 'Stadtverwaltung Beispielstadt',
      email: 'eingangsrechnung@beispielstadt.example',
      address: { city: 'Beispielstadt', postalCode: '12345', countryCode: 'DE' },
    },
    lines: [
      {
        description: 'Beratungsleistung April 2026',
        quantity: 40,
        unitCode: 'HUR',
        unitPrice: 95.00,
        lineTotal: 3800.00,
        vatRate: 19,
        vatCategoryCode: 'S',
      },
    ],
    taxSummary: [{ vatCategoryCode: 'S', vatRate: 19, taxableAmount: 3800.00, taxAmount: 722.00 }],
    paymentMeans: { typeCode: '58', iban: 'DE89370400440532013000' },
    totalNetAmount: 3800.00,
    totalTaxAmount: 722.00,
    totalGrossAmount: 4522.00,
  },
});

// `xml` is the same document curl writes to stdout.
console.log(generated.xml);
import os

from beliq import Beliq

beliq = Beliq(api_key=os.environ["BELIQ_API_KEY"])

generated = beliq.generate(
    standard="xrechnung",
    profile="xrechnung",
    output="xml",
    invoice={
        "number": "RE-2026-0042",
        "issueDate": "2026-04-13",
        "dueDate": "2026-05-13",
        "currencyCode": "EUR",
        "buyerReference": "04011000-12345-03",
        "seller": {
            "name": "Muster GmbH",
            "vatId": "DE123456789",
            "email": "rechnung@muster.example",
            "contactName": "Klaus Muster",
            "phone": "+49 30 1234567",
            "address": {
                "street": "Hauptstraße 1",
                "city": "Berlin",
                "postalCode": "10115",
                "countryCode": "DE",
            },
        },
        "buyer": {
            "name": "Stadtverwaltung Beispielstadt",
            "email": "eingangsrechnung@beispielstadt.example",
            "address": {"city": "Beispielstadt", "postalCode": "12345", "countryCode": "DE"},
        },
        "lines": [
            {
                "description": "Beratungsleistung April 2026",
                "quantity": 40,
                "unitCode": "HUR",
                "unitPrice": 95.00,
                "lineTotal": 3800.00,
                "vatRate": 19,
                "vatCategoryCode": "S",
            },
        ],
        "taxSummary": [{"vatCategoryCode": "S", "vatRate": 19, "taxableAmount": 3800.00, "taxAmount": 722.00}],
        "paymentMeans": {"typeCode": "58", "iban": "DE89370400440532013000"},
        "totalNetAmount": 3800.00,
        "totalTaxAmount": 722.00,
        "totalGrossAmount": 4522.00,
    },
)

# `xml` is the same document curl writes to stdout.
print(generated.xml)

XML syntax

XRechnung supports both UBL 2.1 and CII D16B. Beliq generates CII by default.

Submission channels

XRechnung invoices are submitted to government entities via:

  • ZRE (Zentraler Rechnungseingang) — for federal agencies
  • OZG-RE — for state and municipal authorities

Beliq generates compliant XML. Submission to government portals is handled by your ERP or AP system.

Validation

Beliq validates XRechnung invoices against:

  1. CII D16B or UBL 2.1 XSD schema
  2. EN 16931 core Schematron rules (currently v1.3.16)
  3. XRechnung-specific Schematron rules (currently v2.6.0)

See the validation artifacts page for version details.

ZUGFeRD 2.x

ZUGFeRD 2.x

ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a hybrid format that embeds CII D22B XML inside a PDF/A-3 document. Beliq targets ZUGFeRD 2.x — jointly published with Factur-X 1.09.2 — and is widely used in German B2B invoicing because one file supports both people and systems.

Profiles

ZUGFeRD supports multiple profiles that determine the level of detail in the embedded XML:

Profile Beliq value Description
Minimum minimum Minimal structured data (invoice number, date, totals)
Basic WL basicwl Basic without lines — header data only, no line items
Basic basic Complete header data and line items
EN 16931 (Comfort) en16931 Full EN 16931 compliance — recommended for most use cases
Extended extended Additional fields beyond EN 16931

Generating ZUGFeRD invoices

Use standard: "zugferd" with output: "pdf":

generate-zugferd.sh
curl -X POST https://api.beliq.eu/v1/generate \
  -H "Authorization: Bearer blq_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "standard": "zugferd",
    "profile": "en16931",
    "output": "pdf",
    "invoice": {
      "number": "RE-2026-0042",
      "issueDate": "2026-04-13",
      "currencyCode": "EUR",
      "seller": {
        "name": "Muster GmbH",
        "vatId": "DE123456789",
        "address": {
          "street": "Hauptstraße 1",
          "city": "Berlin",
          "postalCode": "10115",
          "countryCode": "DE"
        }
      },
      "buyer": {
        "name": "Kunde AG",
        "address": {
          "city": "München",
          "postalCode": "80331",
          "countryCode": "DE"
        }
      },
      "lines": [
        {
          "description": "Software-Lizenz",
          "quantity": 1,
          "unitCode": "C62",
          "unitPrice": 499.00,
          "lineTotal": 499.00,
          "vatRate": 19,
          "vatCategoryCode": "S"
        }
      ],
      "taxSummary": [
        { "vatCategoryCode": "S", "vatRate": 19, "taxableAmount": 499.00, "taxAmount": 94.81 }
      ],
      "totalNetAmount": 499.00,
      "totalTaxAmount": 94.81,
      "totalGrossAmount": 593.81
    }
  }' --output invoice.pdf
import { writeFile } from 'node:fs/promises';

import { Beliq } from '@beliq/sdk';

const beliq = new Beliq({ apiKey: process.env.BELIQ_API_KEY! });

const generated = await beliq.generate({
  standard: 'zugferd',
  profile: 'en16931',
  output: 'pdf',
  invoice: {
    number: 'RE-2026-0042',
    issueDate: '2026-04-13',
    currencyCode: 'EUR',
    seller: {
      name: 'Muster GmbH',
      vatId: 'DE123456789',
      address: { street: 'Hauptstraße 1', city: 'Berlin', postalCode: '10115', countryCode: 'DE' },
    },
    buyer: { name: 'Kunde AG', address: { city: 'München', postalCode: '80331', countryCode: 'DE' } },
    lines: [
      {
        description: 'Software-Lizenz',
        quantity: 1,
        unitCode: 'C62',
        unitPrice: 499.00,
        lineTotal: 499.00,
        vatRate: 19,
        vatCategoryCode: 'S',
      },
    ],
    taxSummary: [{ vatCategoryCode: 'S', vatRate: 19, taxableAmount: 499.00, taxAmount: 94.81 }],
    totalNetAmount: 499.00,
    totalTaxAmount: 94.81,
    totalGrossAmount: 593.81,
  },
});

await writeFile('invoice.pdf', generated.bytes);
import os
from pathlib import Path

from beliq import Beliq

beliq = Beliq(api_key=os.environ["BELIQ_API_KEY"])

generated = beliq.generate(
    standard="zugferd",
    profile="en16931",
    output="pdf",
    invoice={
        "number": "RE-2026-0042",
        "issueDate": "2026-04-13",
        "currencyCode": "EUR",
        "seller": {
            "name": "Muster GmbH",
            "vatId": "DE123456789",
            "address": {
                "street": "Hauptstraße 1",
                "city": "Berlin",
                "postalCode": "10115",
                "countryCode": "DE",
            },
        },
        "buyer": {
            "name": "Kunde AG",
            "address": {"city": "München", "postalCode": "80331", "countryCode": "DE"},
        },
        "lines": [
            {
                "description": "Software-Lizenz",
                "quantity": 1,
                "unitCode": "C62",
                "unitPrice": 499.00,
                "lineTotal": 499.00,
                "vatRate": 19,
                "vatCategoryCode": "S",
            },
        ],
        "taxSummary": [{"vatCategoryCode": "S", "vatRate": 19, "taxableAmount": 499.00, "taxAmount": 94.81}],
        "totalNetAmount": 499.00,
        "totalTaxAmount": 94.81,
        "totalGrossAmount": 593.81,
    },
)

Path("invoice.pdf").write_bytes(generated.content)

The resulting PDF is a valid PDF/A-3b document with the CII XML embedded as factur-x.xml.

Parsing ZUGFeRD invoices

Upload a ZUGFeRD PDF to the parse endpoint to extract the embedded invoice data:

parse-zugferd.sh
curl -X POST https://api.beliq.eu/v1/parse \
  -H "Authorization: Bearer blq_live_abc123..." \
  -H "Content-Type: application/octet-stream" \
  --data-binary @invoice.pdf
import { readFile } from 'node:fs/promises';

import { Beliq } from '@beliq/sdk';

const beliq = new Beliq({ apiKey: process.env.BELIQ_API_KEY! });

const parsed = await beliq.parse(await readFile('invoice.pdf'));

console.log(parsed.format, parsed.profileDetected);
console.log(parsed.invoice);
import os
from pathlib import Path

from beliq import Beliq

beliq = Beliq(api_key=os.environ["BELIQ_API_KEY"])

parsed = beliq.parse(Path("invoice.pdf").read_bytes())

print(parsed.format, parsed.profile_detected)
print(parsed.invoice)

Beliq searches for known attachment filenames (factur-x.xml, zugferd-invoice.xml, ZUGFeRD-invoice.xml) and extracts the XML for parsing.

Common validation errors

Common validation errors

Rule ID Message Fix
BR-DE-15 Buyer reference (BT-10) is missing Add buyerReference to your invoice
BR-DE-1 Payment instructions (BG-16) are missing Add paymentMeans to your invoice
BR-DE-2 Seller contact (BG-6) is missing Add contactName to the seller object; BR-DE-5, BR-DE-6 and BR-DE-7 then ask for the name (BT-41), phone (BT-42) and email (BT-43)
PEPPOL-EN16931-R020 / R010 Seller or buyer electronic address is missing Add email, a peppol block, or a vatId to that party. On standard: "xrechnung" Beliq rejects this at the request boundary with 400, so a verified generate should not reach this rule
BR-01 Specification identifier missing This is set automatically by Beliq — email hello@beliq.eu if you see this
BR-06 VAT identifier is missing Add vatId (e.g. DE123456789) to the seller
Resources

Resources