No payee account or payment card details for direct debit

Error BR-DE-25-b XRechnung

If BT-81 "Payment means type code" contains a key for direct debits (59), BG-17 and BG-18 shall not be transmitted.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

When TypeCode is 59, the invoice contains details for a payee account, a payee financial institution, a debtor financial institution, or a payment card. The rule prohibits these elements for this payment type.

What the rule means

Code 59 identifies a direct debit payment. The checked details in BG-17 and BG-18 are not used for this payment type and must not occur in this context.

Affected fields BT-81 BG-17 BG-18
Please remove account and card details that do not belong to the direct debit

The invoice uses payment type 59 but also includes account, financial institution, or payment card details. Remove the details that are not allowed for this payment type.

What to do
  1. Check the FacturXInvoice.PaymentMeans call and the value set for PaymentMeans.TypeCode.
  2. Remove details in PayeePartyCreditorFinancialAccount, PayeeSpecifiedCreditorFinancialInstitution, PayerSpecifiedDebtorFinancialInstitution, and ApplicableTradeSettlementFinancialCard.
  3. In particular, check whether an account is added through AddCreditorFinancialAccount(...) or CreditorBankAccounts.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>59</ram:TypeCode>
  <ram:PayeePartyCreditorFinancialAccount>
    <ram:IBANID>DE1234567890</ram:IBANID>
  </ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
✓ Correct
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>59</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
Check in FactoorSharp
  • FacturXInvoice.PaymentMeans (BG-17; BG-18; ID: BT-81)
  • PaymentMeans.TypeCode (SpecifiedPaymentMeans: BT-81)
  • FacturXInvoice.AddCreditorFinancialAccount(iban, bic, id, bankleitzahl, bankName, name) (BG-17)
  • FacturXInvoice.AnyCreditorFinancialAccount() (BG-17)
  • FacturXInvoice.CreditorBankAccounts (BG-17)
Technical details

The test requires PayeePartyCreditorFinancialAccount, PayeeSpecifiedCreditorFinancialInstitution, PayerSpecifiedDebtorFinancialInstitution, and ApplicableTradeSettlementFinancialCard all to be absent. It applies in the stated context when TypeCode is 59.

Where the rule applies

The rule applies to SpecifiedTradeSettlementPaymentMeans in the document-level settlement when TypeCode is 59.

Original message from the Schematron
Wenn BT-81 "Payment means type code" einen Schlüssel für Lastschriften enthält (59), dürfen BG-17 und BG-18 nicht übermittelt werden.
Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementPaymentMeans[normalize-space(ram:TypeCode) = '59']
Test expression (assert/@test)
not(ram:PayeePartyCreditorFinancialAccount) and not(ram:PayeeSpecifiedCreditorFinancialInstitution) and not(ram:PayerSpecifiedDebtorFinancialInstitution) and not(ram:ApplicableTradeSettlementFinancialCard)