# BR-DE-31 Direct debit requires the debited account identifier

Under rule BR-DE-31 of the German XRechnung profile, the debited account identifier in BT-91 (debtor IBAN) is mandatory as soon as the invoice contains the direct debit group BG-19, for payment means code 49 as well as for code 59. BG-19 is present when the invoice carries direct debit data: in UBL a cac:PaymentMandate (for example only the mandate reference BT-89), in CII any of BT-89, BT-90 or BT-91. The payment means code alone does not trigger or waive the rule. Banks cannot execute a direct debit without the debtor account authorized under the customer’s SEPA mandate reference (BT-89).

## Problem Description

> **ERROR**: German XRechnung rule (KoSIT, BR-DE) · XRechnung 3.0

## Context and Significance

BR-DE-31 checks whether BG-19 is present, not which payment means code is used: code 49 with a mandate reference BT-89 fails the same way as code 59. Without BT-91, direct debit instructions cannot be mapped into standard pain.008 banking files.

## Solution

In your customer master data and sales order profile, populate the debtor’s IBAN bank account details. In UBL 2.1 syntax, populate <cac:PaymentMeans><cac:PaymentMandate><cac:PayerFinancialAccount><cbc:ID>DE89370400440532013000</cbc:ID></cac:PayerFinancialAccount></cac:PaymentMandate></cac:PaymentMeans>. In UN/CEFACT CII syntax, populate <ram:PayerPartyDebtorFinancialAccount><ram:IBANID> under <ram:SpecifiedTradeSettlementPaymentMeans>. If the transaction is not paid by direct debit, remove all direct debit data that forms BG-19 (BT-89, BT-90 and BT-91) and use a credit transfer code such as 58 or 30. Changing only BT-81 does not resolve the error while BG-19 remains.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=BR-DE-31)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=BR-DE-31)

## Valid Examples

- Direct debit (BT-81 = 59) with mandate reference BT-89 and debited account BT-91 = "DE89370400440532013000"
- Direct debit (BT-81 = 49) with mandate reference BT-89 and Austrian debtor account BT-91 = "AT611904300234573201"

## Invalid Examples

- Payment means code 49 or 59 with a PaymentMandate (BG-19) that contains no PayerFinancialAccount/ID element
- CII invoice with mandate reference BT-89 (ram:DirectDebitMandateID) but no ram:PayerPartyDebtorFinancialAccount/ram:IBANID

## Code Examples

### Valid XML
```
<cac:PaymentMeans>
  <cbc:PaymentMeansCode>59</cbc:PaymentMeansCode>
  <cac:PaymentMandate>
    <cbc:ID>MANDATE-2026-001</cbc:ID>
    <cac:PayerFinancialAccount>
      <cbc:ID>DE89370400440532013000</cbc:ID>
    </cac:PayerFinancialAccount>
  </cac:PaymentMandate>
</cac:PaymentMeans>
```

### Invalid XML
```
<cac:PaymentMeans>
  <cbc:PaymentMeansCode>59</cbc:PaymentMeansCode>
  <cac:PaymentMandate>
    <cbc:ID>MANDATE-2026-001</cbc:ID>
  </cac:PaymentMandate>
</cac:PaymentMeans>
```

## Affected Fields

- [BG-19 Direct debit](/resources/xrechnung/bt-89-mandate-reference-identifier)
- [BT-91 Debited account identifier](/resources/xrechnung/bt-91-debited-account-identifier)
- [BT-81 Payment means type code](/resources/xrechnung/bt-81-payment-means-type-code)

## Related Rules

- [BR-DE-20](/resources/kosit-validator-errors/br-de-20-sepa-debited-account-must-be-valid-iban)
- [BR-DE-30](/resources/kosit-validator-errors/br-de-30-direct-debit-requires-creditor-identifier)
- [BR-61](/resources/kosit-validator-errors/br-61-credit-transfer-account-required)

## Validation Tools

- [Official KoSIT Validator](https://github.com/itplr-kosit/validator): Run the official KoSIT validator with the XRechnung configuration to check EN 16931 and XRechnung rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Find validation errors during conversion and review each correction.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [All validation errors](/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
