Skip to content

bankstatementparser-loader-sepa

PAIN.008 (CstmrDrctDbtInitn) is the ISO 20022 message a creditor sends its bank to collect SEPA Direct Debits; PAIN.002 (CstmrPmtStsRpt) is the payment status report that comes back, settling or rejecting each transaction.

bankstatementparser-loader-sepa turns either message into a flat list of bankstatementparser Transaction objects (source="sepa") that the rest of a deterministic pipeline can consume unchanged.

Concern How this loader handles it
Message type Detected from the CstmrPmtStsRpt or CstmrDrctDbtInitn element, or from TxInfAndSts / PmtInf content; namespaces are ignored
PAIN.008 One positive transaction per DrctDbtTxInf, on the creditor's account, dated ReqdColltnDt
PAIN.002 One transaction per TxInfAndSts; a rejected (RJCT) status is negative, any other keeps its sign
Amounts ISO 20022 decimals to Decimal (never float); text that is not one reads as 0.00
XML safety Parsed with defusedxml: an entity declaration, internal or external, is refused
Errors ParseError for text that is not XML; a defusedxml ValueError for a forbidden construct

In this manual

The source, issues and releases live on GitHub; the package is on PyPI.