python-sepaxml icon indicating copy to clipboard operation
python-sepaxml copied to clipboard

schema difference between pain.001.001.03 and pain.001.001.09 - AdrTp (Address Type) element

Open cr-solutions opened this issue 2 months ago • 2 comments

pain.001.001.03: The AdrTp (Address Type) element directly contains the address type code:

<AdrTp>ADDR</AdrTp>

pain.001.001.09: The AdrTp element uses a choice structure with either Cd (Code) or Prtry (Proprietary) elements:

<AdrTp><Cd>ADDR</Cd></AdrTp>

Solution: I modified the sepaxml/transfer.py file to handle this schema difference by:

Detecting the schema version: Checking if self.schema != "pain.001.001.03"

Creating the correct structure: For newer schemas, creating an AdrTp element with a nested Cd element containing the address type value

Maintaining backward compatibility: Keeping the old behavior for pain.001.001.03

transfer.py

cr-solutions avatar Oct 13 '25 12:10 cr-solutions