Skip to main content

Germany ๐Ÿ‡ฉ๐Ÿ‡ช

XRechnung requirements and e-invoicing compliance for the German market.

Overviewโ€‹

AspectDetails
B2G MandateRequired (federal since 2020, states 2022-2024)
B2B Mandate2025 (receiving), 2027-2028 (sending)
Required CIUSXRechnung (mandatory for B2G)
Primary Scheme0204 (Leitweg-ID for B2G), 9930 (VAT)
Government PortalZRE (federal), various state portals
B2B Mandate Coming

Germany has mandated B2B e-invoicing:

  • 2025: All businesses must be able to receive e-invoices
  • 2027: Businesses >โ‚ฌ800k turnover must send e-invoices
  • 2028: All businesses must send e-invoices

XRechnung CIUSโ€‹

XRechnung is Germany's national extension of EN16931, mandatory for B2G.

Customization IDโ€‹

<!-- XRechnung 3.0.1 (current version) -->
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>

Profile IDโ€‹

<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>

Identifier Schemesโ€‹

Leitweg-ID (0204) โ€” B2G Requiredโ€‹

The routing ID for German public administration:

# Format: 04-xxx-xxxxx-xx (structure varies by state)
participant = {
"scheme": "0204",
"identifier": "04011000-12345-67",
"name": "Bundesministerium fรผr Wirtschaft",
"country": "DE"
}

Structure:

  • Coarse routing: Entity type + region
  • Fine routing: Specific department
  • Check digit for validation

VAT Number (9930) โ€” B2Bโ€‹

For business-to-business invoicing:

# Format: DE + 9 digits
participant = {
"scheme": "9930",
"identifier": "DE123456789",
"name": "Example GmbH",
"country": "DE"
}

Looking Up Leitweg-IDsโ€‹

Government entities are listed in:

Government Portalsโ€‹

Federal (ZRE)โ€‹

All federal invoices go through the Zentrale Rechnungseingangsplattform:

# Sending to federal government
response = requests.post(
"https://app.goroute.ai/peppol-api/api/v1/documents",
headers={"X-API-Key": "your_api_key"},
json={
"receiver_scheme": "0204",
"receiver_id": "04011000-12345-67",
# The buyer reference is MANDATORY and is carried in the UBL document
# as cbc:BuyerReference (Leitweg-ID format), not as a request field.
"document": invoice_xml
}
)

Requirements:

  • โœ… XRechnung format
  • โœ… Leitweg-ID as buyer endpoint
  • โœ… Buyer reference (often Leitweg-ID or PO number)

State Portalsโ€‹

Each German state has its own portal:

StatePortalMandate Date
Baden-Wรผrttembergservice-bw.de01/2022
BayerneBill Bayern04/2024
BerlinZRE11/2020
BrandenburgZRE11/2020
Nordrhein-WestfaleneRechnung.NRW04/2020

Invoice Requirementsโ€‹

Mandatory for XRechnungโ€‹

<Invoice>
<!-- XRechnung CustomizationID -->
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>

<!-- CRITICAL: Buyer Reference (Leitweg-ID often used) -->
<cbc:BuyerReference>04011000-12345-67</cbc:BuyerReference>

<!-- German sender with VAT -->
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9930">DE123456789</cbc:EndpointID>

<cac:PartyTaxScheme>
<cbc:CompanyID>DE123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</cac:Party>
</cac:AccountingSupplierParty>

<!-- Government receiver with Leitweg-ID -->
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0204">04011000-12345-67</cbc:EndpointID>
</cac:Party>
</cac:AccountingCustomerParty>
</Invoice>

Banking Informationโ€‹

SEPA payment information is expected:

<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cbc:PaymentID>Rechnungsnr-2024-001</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>DE89370400440532013000</cbc:ID>
<cbc:Name>Muster GmbH</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>COBADEFFXXX</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>

German VATโ€‹

VAT Formatโ€‹

# German VAT: DE + 9 digits
def validate_german_vat(vat: str) -> bool:
if not vat.startswith("DE"):
return False
if len(vat) != 11:
return False
return vat[2:].isdigit()

VAT Ratesโ€‹

CodeRateDescription
S19%Standard rate
AA7%Reduced rate
Z0%Zero rate
E0%Exempt

Example XRechnung Invoiceโ€‹

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">

<!-- XRechnung 3.0 -->
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>

<cbc:ID>DE-RG-2024-001234</cbc:ID>
<cbc:IssueDate>2024-01-15</cbc:IssueDate>
<cbc:DueDate>2024-02-15</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>

<!-- MANDATORY for XRechnung -->
<cbc:BuyerReference>04011000-12345-67</cbc:BuyerReference>

<!-- Seller (German company) -->
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9930">DE123456789</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Beispiel GmbH</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>MusterstraรŸe 1</cbc:StreetName>
<cbc:CityName>Berlin</cbc:CityName>
<cbc:PostalZone>10115</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Beispiel GmbH</cbc:RegistrationName>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Max Mustermann</cbc:Name>
<cbc:ElectronicMail>rechnung@beispiel.de</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>

<!-- Buyer (German government) -->
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0204">04011000-12345-67</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Bundesministerium</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>RegierungsstraรŸe 1</cbc:StreetName>
<cbc:CityName>Berlin</cbc:CityName>
<cbc:PostalZone>10117</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Bundesministerium</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>

<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cbc:PaymentID>RG-2024-001234</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>DE89370400440532013000</cbc:ID>
<cbc:Name>Beispiel GmbH</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>COBADEFFXXX</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>

<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">19.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">19.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>

<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">119.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">119.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>

<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="HUR">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>IT-Beratung</cbc:Description>
<cbc:Name>Beratungsleistung</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

GoRoute validation for German invoicesโ€‹

Which German checks run depends on how you submit the invoice, so pick the endpoint that matches what you have.

If you build the invoice through GoRouteโ€‹

POST /api/v1/invoices/validate is a dry run over the canonical invoice model, and it is the path that applies the German rules:

response = requests.post(
"https://app.goroute.ai/peppol-api/api/v1/invoices/validate",
headers={"X-API-Key": "your_api_key"},
json={"invoice": invoice_payload}
)

# German checks applied here:
# - DE_001 (error) Leitweg-ID required in buyer_reference for B2G (scheme 0204)
# - DE_002 (warning) Leitweg-ID format looks wrong
# - DE_003 (warning) German VAT number should be DE followed by 9 digits

If you already have UBL XMLโ€‹

POST /api/v1/documents/validate checks the document itself โ€” XML syntax, UBL schema and Peppol BIS 3 business rules:

response = requests.post(
"https://app.goroute.ai/peppol-api/api/v1/documents/validate",
headers={"X-API-Key": "your_api_key"},
json={
"document": invoice_xml, # UBL XML string
"profile": "en16931"
}
)
Full XRechnung schematron is not run

GoRoute does not currently execute the XRechnung CIUS schematron, so BR-DE-3 through BR-DE-26 are not checked. The German rules listed above are the ones that actually run. Passing GoRoute validation is therefore not evidence that an invoice satisfies XRechnung in full โ€” validate against an XRechnung validator as well before you rely on it for a B2G submission.

B2B Mandate Preparationโ€‹

What to Do Nowโ€‹

  1. Register on Peppol to receive invoices
  2. Update accounting systems to process e-invoices
  3. Test with partners before mandate dates
  4. Archive digitally (GoBD compliance)

Timelineโ€‹

Resourcesโ€‹

Next Stepsโ€‹

Further readingโ€‹

Ready to build? The free developer sandbox gives you test credentials and a registered participant, provisioned within 24 hours on business days. Recorded ERP integration walkthroughs are on the tutorials page.