E-invoice error explained
Code 59 means SEPA direct debit: you collect the amount from the buyer.
Code 59 means SEPA direct debit: you collect the amount from the buyer. The direct debit group (BG-19) must then be present with the mandate reference (BT-89), the creditor identifier (BT-90) and the buyer's IBAN (BT-91). Your own bank account for transfers (BG-17) and card data (BG-18) must not be included. If BT-90 or BT-91 is missing on its own, BR-DE-30 and BR-DE-31 fire as well.
BR-DE-25-a: If BT-81 "Payment means type code" contains a code for direct debit (59), exactly BG-19 "DIRECT DEBIT" must be transmitted.
BR-DE-25-b: If BT-81 "Payment means type code" contains a code for direct debit (59), BG-17 and BG-18 must not be transmitted.
Source: KoSIT configuration XRechnung 3.0.2 (31 Jan 2026).
For code 59 write: ram:DirectDebitMandateID in ram:SpecifiedTradePaymentTerms, ram:CreditorReferenceID in ram:ApplicableHeaderTradeSettlement and the buyer's IBAN in ram:PayerPartyDebtorFinancialAccount/ram:IBANID. Remove ram:PayeePartyCreditorFinancialAccount. If the customer pays by transfer, use code 58.
Wrong (CII)
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>59</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>DE02120300000000202051</ram:IBANID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>Right (CII)
<ram:CreditorReferenceID>DE98ZZZ09999999999</ram:CreditorReferenceID>
<!-- ... -->
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>59</ram:TypeCode>
<ram:PayerPartyDebtorFinancialAccount>
<ram:IBANID>DE75512108001245126199</ram:IBANID>
</ram:PayerPartyDebtorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<!-- ... -->
<ram:SpecifiedTradePaymentTerms>
<ram:DirectDebitMandateID>MANDAT-4711</ram:DirectDebitMandateID>
</ram:SpecifiedTradePaymentTerms>Sales / Project Operations: Sales and Project Operations have no e-invoice output out of the box. In the WBS Invoice Accelerator for Dynamics 365 there is no direct debit in the e-invoice. The Accelerator only writes code 58 with the IBAN from the brand profile.
Check your invoice for free. The validator shows every finding with an explanation and its location in the XML.