BR-DE-17 IBAN must have a valid format
What this rule checks
BR-DE-17 validates that the value in BT-84 (Payment account identifier) conforms to the structure of a valid IBAN (International Bank Account Number). The rule checks the IBAN structure: country code (2 letters), check digits (2 digits), and BBAN (Basic Bank Account Number, country-specific length).
In the UBL representation, this value is located in the <cbc:ID> element within <cac:PaymentMeans><cac:PayeeFinancialAccount>.
Why this rule exists
A correctly formatted IBAN is essential for automated payment processing in the German e-invoicing ecosystem. Invalid IBANs lead to:
- Failed payments: The bank rejects the transfer
- Manual intervention: A clerk must determine the correct bank details
- Payment delays: The invoice issuer receives their money later
The IBAN is the international standard for account identification (ISO 13616) and is the primary identifier for a bank account in the SEPA area.
What triggers a failure
Validation fails when the value in <cbc:ID> (within PayeeFinancialAccount) does not have a valid IBAN structure:
- Too short or too long for the respective country (German IBAN: 22 characters)
- Missing or invalid country code at the beginning
- Invalid check digits at positions 3-4
- Contains disallowed characters (only uppercase A-Z and digits 0-9 are permitted)
- Contains spaces (must be removed)
Failing XML example
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ID>RE-2024-003</cbc:ID>
<cbc:IssueDate>2024-01-15</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>
<!-- ... -->
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cac:PayeeFinancialAccount>
<!-- ERROR: IBAN is too short and has an invalid format -->
<cbc:ID>DE1234</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<!-- ... -->
</Invoice>
More examples of invalid IBANs:
<!-- Spaces in the IBAN -->
<cbc:ID>DE89 3704 0044 0532 0130 00</cbc:ID>
<!-- Lowercase letters -->
<cbc:ID>de89370400440532013000</cbc:ID>
<!-- Invalid check digits -->
<cbc:ID>DE00370400440532013000</cbc:ID>
The fix
Use a correctly formatted IBAN without spaces and in uppercase:
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ID>RE-2024-003</cbc:ID>
<cbc:IssueDate>2024-01-15</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>
<!-- ... -->
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cac:PayeeFinancialAccount>
<cbc:ID>DE89370400440532013000</cbc:ID>
<cbc:Name>Musterfirma GmbH</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>COBADEFFXXX</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<!-- ... -->
</Invoice>
Structure of a German IBAN
A German IBAN is always 22 characters long and follows this schema:
| Position | Content | Example |
|---|---|---|
| 1-2 | Country code | DE |
| 3-4 | Check digits | 89 |
| 5-12 | Bank code (Bankleitzahl) | 37040044 |
| 13-22 | Account number | 0532013000 |
Edge cases and common mistakes
-
Remove spaces: IBANs are often displayed in groups of four on paper (
DE89 3704 0044 0532 0130 00), but must be specified without spaces in the XML:DE89370400440532013000. -
Non-German IBANs are valid: BR-DE-17 accepts IBANs from all countries. An Austrian IBAN (
AT611904300234573201, 20 characters) or Dutch IBAN (NL91ABNA0417164300, 18 characters) are equally valid. The length varies by country. -
Check digit validation: The check digits at positions 3-4 are calculated using the MOD-97 algorithm (ISO 7064). A pure format check may accept the IBAN, but the mathematical check digit validation could fail separately.
-
BIC may be required: For payments to accounts outside the SEPA area, the BIC (Business Identifier Code) in BT-86 may also be required. Within the SEPA area, the BIC has been optional since 2016.
-
Account number vs. IBAN: BT-84 expects an IBAN, not a legacy national account number. If you only have a bank code (BLZ) and account number, these must first be converted to an IBAN. Most banks offer online tools for this conversion.
-
ZUGFeRD/Factur-X (CII): In the CII representation, the IBAN is located at
<ram:IBANID>within<ram:SpecifiedTradeSettlementPaymentMeans><ram:PayeePartyCreditorFinancialAccount>.
Links to specification
- XRechnung Versions and Packages — Official XRechnung specification
- ISO 13616 IBAN Standard — International IBAN standard
- Deutsche Bundesbank IBAN Rules — Official IBAN rules
- SEPA Countries and IBAN Lengths — Overview of SEPA participant countries