BR-DE-07 VAT Number Format
What this rule checks
BR-DE-07 validates that the seller’s VAT identification number in field BT-31 (Seller VAT identifier) follows the correct format. When a VAT ID is provided, it must match the pattern defined by the respective EU member state. For German businesses, this means: the country prefix DE followed by exactly 9 digits.
In the XRechnung XML context, this rule inspects the element cac:PartyTaxScheme/cbc:CompanyID, where the associated cac:TaxScheme/cbc:ID must be set to VAT.
Why this rule exists
The VAT identification number is a critical identifier in intra-community trade and automated invoice processing. Malformed or incomplete VAT IDs cause:
- Rejection by validation systems such as the Peppol infrastructure or government verification endpoints
- Failures in automated matching within ERP and accounting systems
- Issues with input tax deduction eligibility, as the Federal Central Tax Office (BZSt) performs machine-based VAT ID verification
- Delays in EC Sales List (Zusammenfassende Meldung) reporting for intra-community supplies
What triggers a failure
The rule fails when:
- The country prefix
DEis missing (e.g., just123456789) - The digit count is incorrect (e.g.,
DE12345678with only 8 digits) - Invalid characters are present (e.g.,
DE 123 456 789with spaces) - The format does not match any recognized EU VAT ID pattern
- The
TaxScheme/IDis not set toVAT
Failing XML example
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyTaxScheme>
<!-- ERROR: Missing DE country prefix -->
<cbc:CompanyID>1234567</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</cac:Party>
</cac:AccountingSupplierParty>
This example violates BR-DE-07 in two ways: the country prefix DE is missing, and the number has only 7 digits instead of the required 9.
The fix
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyTaxScheme>
<!-- CORRECT: DE + 9 digits -->
<cbc:CompanyID>DE123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</cac:Party>
</cac:AccountingSupplierParty>
Make sure that:
- The value in
cbc:CompanyIDincludes the full country prefix (e.g.,DEfor Germany) - Exactly 9 digits follow the country prefix
- No spaces, dots, or separators are included
cac:TaxScheme/cbc:IDis set toVAT
Edge cases and common mistakes
- Non-German EU VAT IDs: Other EU member states have different formats (e.g.,
ATU12345678for Austria,FR12345678901for France). These are also valid in BT-31 and are validated according to the respective country format. - Tax number vs. VAT ID: The German tax number (Steuernummer, e.g.,
123/456/78901) belongs in a different field (BT-32,PartyLegalEntity/CompanyID) and follows a completely different format. Confusing these two identifiers is a frequent source of errors. - Country prefix is part of the value: The
DEprefix is not passed as a separate XML attribute; it is an integral part of the text content ofcbc:CompanyID. - Lowercase letters:
de123456789may cause validation failures. Always use uppercase:DE123456789. - Check digit logic: The 9th digit of a German VAT ID is a check digit. BR-DE-07 typically validates only the format, not the mathematical correctness of the check digit. However, invalid numbers will be caught during BZSt verification.