raphaelm / python-sepaxml

SEPA Direct Debit XML generation in python
MIT License
110 stars 41 forks source link

Add the UltmtCdtr block for SEPA Direct Debit (Ultimate Creditor) + Customizable MsgId and InitgPty node #54

Open Nickinthebox opened 1 year ago

Nickinthebox commented 1 year ago

Add an optional Ultimate Creditor block for SEPA Direct Debit.

I have implemented it for Organization only (not individuals) following ISO 20022 (french source)

Allow customizable msg_id (MsgId node) option.

Allow customizable initiating_party and initiating_party_id (InitgPty node) options instead of mandatory copying name & creditor_id in this node.

Limit manually set endtoend_id option to 35 chars to meet SEPA standards requirements.

Also add a default AmdmntInd node set to false as it can be required by some banks (if we set it to true, we would need to provide extra details about what has changed in an extra AmdmntInfDtls node, which is not as easy as it seems as it needs multiple child nodes)

raphaelm commented 1 year ago

Nice, thanks! Would you be able to add a test to the test suite as well?