Germany ๐ฉ๐ช
XRechnung requirements and e-invoicing compliance for the German market.
Overviewโ
| Aspect | Details |
|---|---|
| B2G Mandate | Required (federal since 2020, states 2022-2024) |
| B2B Mandate | 2025 (receiving), 2027-2028 (sending) |
| Required CIUS | XRechnung (mandatory for B2G) |
| Primary Scheme | 0204 (Leitweg-ID for B2G), 9930 (VAT) |
| Government Portal | ZRE (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:
- LeitID-Service (official lookup)
- Invoice portal documentation
Government Portalsโ
Federal (ZRE)โ
All federal invoices go through the Zentrale Rechnungseingangsplattform:
# Sending to federal government
invoice = {
"receiver": {
"scheme": "0204",
"identifier": "04011000-12345-67"
},
# Buyer reference is MANDATORY
"buyer_reference": "991-12345-67" # Leitweg-ID format
}
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:
| State | Portal | Mandate Date |
|---|---|---|
| Baden-Wรผrttemberg | service-bw.de | 01/2022 |
| Bayern | eBill Bayern | 04/2024 |
| Berlin | ZRE | 11/2020 |
| Brandenburg | ZRE | 11/2020 |
| Nordrhein-Westfalen | eRechnung.NRW | 04/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โ
| Code | Rate | Description |
|---|---|---|
| S | 19% | Standard rate |
| AA | 7% | Reduced rate |
| Z | 0% | Zero rate |
| E | 0% | 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 XRechnung Validationโ
GoRoute validates XRechnung-specific rules:
response = requests.post(
"https://app.goroute.ai/peppol-api/api/v1/validate",
headers={"X-API-Key": "your_api_key"},
data=invoice_xml
)
# XRechnung-specific validations:
# - BR-DE-1: Buyer reference mandatory
# - BR-DE-2: Leitweg-ID format check
# - BR-DE-3 to BR-DE-26: German business rules
# - XRechnung schematron validation
B2B Mandate Preparationโ
What to Do Nowโ
- Register on Peppol to receive invoices
- Update accounting systems to process e-invoices
- Test with partners before mandate dates
- Archive digitally (GoBD compliance)