AttestwireRule referenceBR-DE-20

BR-DE-20 The debited account on a SEPA direct debit should be a valid IBAN

noun · XRechnung · warning · BT-91

For a sample invoice, the library reports: The payment means type code (BT-81) is "59" (SEPA direct debit), so the debited account identifier (BT-91) should be a valid IBAN — but "DE98700500001234567891" fails the ISO 7064 MOD-97-10 check digits.

Diese Regel auf Deutsch: BR-DE-20 — auf Deutsch erklärt.

Business term
BT-91
Severity
warning

The fix

Set payment.directDebit.debitedAccount to the IBAN written on the signed mandate. Do not retype it from a bank statement, and do not normalise it — take the stored value.

A passing value

the shape this field expects
"directDebit": { "debitedAccount": "DE98700500001234567890" }

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "BR-DE-20",
  "field": "BT-91",
  "severity": "warning",
  "message": "The payment means type code (BT-81) is \"59\" (SEPA direct debit), so the debited account identifier (BT-91) should be a valid IBAN — but \"DE98700500001234567891\" fails the ISO 7064 MOD-97-10 check digits. Positions 3 and 4 are a checksum over the rest of the number, so a single mistyped character makes them disagree. This matters more here than it does for your own account under BR-DE-19: a wrong IBAN on a credit transfer means nobody pays you, while a wrong IBAN on a direct debit means you attempt to collect from an account that is not the one on the mandate.",
  "fix": "Set payment.directDebit.debitedAccount to the IBAN written on the signed mandate. Do not retype it from a bank statement, and do not normalise it — take the stored value.",
  "example": "\"directDebit\": { \"debitedAccount\": \"DE98700500001234567890\" }",
  "xpath": "/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-DE-20"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.