AttestwireRule referenceBR-DE-25-b

BR-DE-25-b A direct debit code rules out credit transfer and card details

noun · XRechnung · fatal · BG-17

For a sample invoice, the library reports: The payment means type code (BT-81) is "59", which XRechnung treats as a direct debit (code 59), so the CREDIT TRANSFER (BG-17) group must not be present — but it is.

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

Business term
BG-17
Severity
fatal

The fix

Remove payment.iban, keeping only payment.directDebit (BG-19). If you meant the other method, change payment.meansCode to match it instead — the code is what decides which group is required.

A passing value

the shape this field expects
"payment": { "meansCode": "59", "directDebit": { "mandateReference": "MANDAT-2026-01", "creditorIdentifier": "DE98ZZZ09999999999", "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-25-b",
  "field": "BG-17",
  "severity": "fatal",
  "message": "The payment means type code (BT-81) is \"59\", which XRechnung treats as a direct debit (code 59), so the CREDIT TRANSFER (BG-17) group must not be present — but it is. A payment instruction that names one settlement method and then supplies the account details of another is not merely redundant: the payer's system reads the code, looks for the matching group, and has no rule for what to do with the extra one. XRechnung closes that ambiguity by forbidding it outright.",
  "fix": "Remove payment.iban, keeping only payment.directDebit (BG-19). If you meant the other method, change payment.meansCode to match it instead — the code is what decides which group is required.",
  "example": "\"payment\": { \"meansCode\": \"59\", \"directDebit\": { \"mandateReference\": \"MANDAT-2026-01\", \"creditorIdentifier\": \"DE98ZZZ09999999999\", \"debitedAccount\": \"DE98700500001234567890\" } }",
  "xpath": "/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount",
  "docsUrl": "https://attestwire.com/rules/BR-DE-25-b"
}

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