AttestwireRule referenceBR-DE-24-b

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

noun · XRechnung · fatal · BG-17 / BG-19

For a sample invoice, the library reports: The payment means type code (BT-81) is "48", which XRechnung treats as a card payment (codes 48, 54 and 55), so the CREDIT TRANSFER (BG-17) and DIRECT DEBIT (BG-19) groups must not be present — but they are.

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

Business term
BG-17 / BG-19
Severity
fatal

The fix

Remove payment.iban and payment.directDebit, keeping only payment.card (BG-18). 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": "48", "card": { "primaryAccountNumber": "4111111111" } }

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-24-b",
  "field": [
    "BG-17",
    "BG-19"
  ],
  "severity": "fatal",
  "message": "The payment means type code (BT-81) is \"48\", which XRechnung treats as a card payment (codes 48, 54 and 55), so the CREDIT TRANSFER (BG-17) and DIRECT DEBIT (BG-19) groups must not be present — but they are. 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 and payment.directDebit, keeping only payment.card (BG-18). 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\": \"48\", \"card\": { \"primaryAccountNumber\": \"4111111111\" } }",
  "xpath": "/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount",
  "docsUrl": "https://attestwire.com/rules/BR-DE-24-b"
}

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