# PEPPOL-EN16931-R061 Direct debit requires the mandate reference identifier (BT-89)

Under rule PEPPOL-EN16931-R061, every payment means with a direct debit code in BT-81 (49 = direct debit, 59 = SEPA direct debit) must state the mandate reference identifier BT-89. The rule comes from Peppol BIS Billing 3.0, and the KoSIT rulepack for XRechnung 3.0.2 applies it too, for UBL and CII. In UBL, the validator checks for cac:PaymentMandate/cbc:ID inside the same cac:PaymentMeans; in CII, for ram:DirectDebitMandateID in ram:SpecifiedTradePaymentTerms of the header settlement. The rule is flagged as fatal, so the invoice is not valid.

## Problem Description

> **ERROR**: Peppol BIS Billing 3.0 rule (OpenPeppol)

## Context and Significance

The error appears when an invoice is marked as direct debit but the mandate reference stays in the ERP customer record or is printed only in a note. Without BT-89 the buyer cannot match the debit to a mandate. R061 covers only the mandate reference. But BT-89 creates the direct debit group BG-19, for code 49 as well as for code 59. As soon as BG-19 is present, XRechnung 3.0.2 also requires the creditor identifier BT-90 under BR-DE-30 and the debited account BT-91 under BR-DE-31.

## Solution

Take the mandate reference from the signed direct debit mandate (for SEPA, the unique mandate reference agreed with the buyer) and export it in BT-89. In UBL 2.1, add <cac:PaymentMandate><cbc:ID>MANDATE-2026-001</cbc:ID></cac:PaymentMandate> inside the <cac:PaymentMeans> with code 49 or 59. In CII, add <ram:DirectDebitMandateID>MANDATE-2026-001</ram:DirectDebitMandateID> inside <ram:SpecifiedTradePaymentTerms> under <ram:ApplicableHeaderTradeSettlement>. If there is no mandate, the buyer cannot be debited: use a credit transfer code (30 or 58) with the seller account in BG-17 instead.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=PEPPOL-EN16931-R061)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=PEPPOL-EN16931-R061)

## Valid Examples

- BT-81 = 59 with BT-89 = "MANDATE-2026-001" in cac:PaymentMandate/cbc:ID
- CII: TypeCode 49 with ram:DirectDebitMandateID = "M-7781" in the header payment terms

## Invalid Examples

- BT-81 = 59 with the debited IBAN in cac:PaymentMandate/cac:PayerFinancialAccount, but no cac:PaymentMandate/cbc:ID
- BT-81 = 49 and the mandate reference appears only in the invoice note (BT-22)

## 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>
    <cac:PayerFinancialAccount>
      <cbc:ID>DE89370400440532013000</cbc:ID>
    </cac:PayerFinancialAccount>
  </cac:PaymentMandate>
</cac:PaymentMeans>
```

## Affected Fields

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

## Related Rules

- [BR-DE-30](/resources/kosit-validator-errors/br-de-30-direct-debit-requires-creditor-identifier)
- [BR-DE-31](/resources/kosit-validator-errors/br-de-31-direct-debit-requires-debited-account)
- [BR-DE-23-b](/resources/kosit-validator-errors/br-de-23-b-credit-transfer-excludes-card-and-direct-debit)

## 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://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/)
- [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.
