Direct debit details for payment type 59

Error BR-DE-25-a XRechnung

If BT-81 "Payment means type code" contains a key for direct debits (59), exactly BG-19 "DIRECT DEBIT" shall 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 settlement is missing all of the checked direct debit details: DirectDebitMandateID, CreditorReferenceID, or the IBAN in PayerPartyDebtorFinancialAccount.

What the rule means

Code 59 identifies a direct debit payment. The rule therefore requires at least one of the checked details from group BG-19.

Affected fields BT-81 BG-19
Please add a direct debit detail for payment type 59

The invoice uses payment type 59 but contains none of the checked direct debit details. You can resolve this by adding one of those details.

What to do
  1. Check the value set for SpecifiedTradeSettlementPaymentMeans through PaymentMeans.TypeCode or FacturXInvoice.PaymentMeans.
  2. Add at least one detail: DirectDebitMandateID, CreditorReferenceID, or the IBAN in PayerPartyDebtorFinancialAccount.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>59</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
✓ Correct
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>59</ram:TypeCode>
  <ram:SpecifiedTradePaymentTerms>
    <ram:DirectDebitMandateID>MANDATE-123</ram:DirectDebitMandateID>
  </ram:SpecifiedTradePaymentTerms>
</ram:SpecifiedTradeSettlementPaymentMeans>
Check in FactoorSharp
  • PaymentMeans.TypeCode (SpecifiedPaymentMeans: BT-81)
  • FacturXInvoice.PaymentMeans (ID: BT-81)
Technical details

The test passes if at least one of the three paths yields a detail. The rule context limits the check to SpecifiedTradeSettlementPaymentMeans whose normalized TypeCode equals 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), muss genau BG-19 "DIRECT DEBIT" übermittelt werden.
Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementPaymentMeans[normalize-space(ram:TypeCode) = '59']
Test expression (assert/@test)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:CreditorReferenceID or ram:PayerPartyDebtorFinancialAccount/ram:IBANID