Exclude credit transfer and direct debit details for card payments

Error BR-DE-24-b XRechnung

If BT-81 "Payment means type code" contains a key for card payments (48, 54, 55), BG-17 and BG-19 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 ram:TypeCode has the value 48, 54, or 55, at least one detail excluded for card payments is present: ram:PayeePartyCreditorFinancialAccount, ram:DirectDebitMandateID, ram:CreditorReferenceID, or ram:PayerPartyDebtorFinancialAccount/ram:IBANID. These details belong to BG-17 or BG-19.

What the rule means

Payment type codes 48, 54, and 55 denote card payments. Credit transfer and direct debit details must therefore not be supplied as payment information at the same time.

Affected fields BT-81 BG-17 BG-19
Please remove credit transfer and direct debit details from the card payment

The payment type is a card payment, but credit transfer or direct debit details are also present. Remove the payment details that do not match this payment type.

What to do
  1. Check the payment type code through PaymentMeans.TypeCode.
  2. Remove ram:PayeePartyCreditorFinancialAccount if a payee account for a credit transfer is supplied.
  3. Remove the direct debit details ram:DirectDebitMandateID, ram:CreditorReferenceID, and ram:PayerPartyDebtorFinancialAccount/ram:IBANID if they are present.
  4. Check the payment details set through FacturXInvoice.PaymentMeans.
  5. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>48</ram:TypeCode>
  <ram:PayeePartyCreditorFinancialAccount/>
</ram:SpecifiedTradeSettlementPaymentMeans>
✓ Correct
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>48</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
Check in FactoorSharp
  • FacturXInvoice.PaymentMeans (BG-17; 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 ram:PayeePartyCreditorFinancialAccount to be absent and all three alternative direct debit indicators to be absent: ram:DirectDebitMandateID, ram:CreditorReferenceID, and ram:PayerPartyDebtorFinancialAccount/ram:IBANID.

Where the rule applies

The rule applies to ram:SpecifiedTradeSettlementPaymentMeans for payment type codes 48, 54, and 55 and also checks the settlement payment terms.

Original message from the Schematron
Wenn BT-81 "Payment means type code" einen Schlüssel für Kartenzahlungen enthält (48, 54, 55), dürfen BG-17 und BG-19 nicht übermittelt werden.
Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementPaymentMeans[normalize-space(ram:TypeCode) = ('48','54','55')]
Test expression (assert/@test)
not(ram:PayeePartyCreditorFinancialAccount) and not( /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:CreditorReferenceID or ram:PayerPartyDebtorFinancialAccount/ram:IBANID )