raphaelm / python-sepaxml

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

Issue with tags in {urn:iso:std:iso:20022:tech:xsd:pain.001.001.03}CstmrDrctDbtInitn #46

Closed alexdicodi closed 1 year ago

alexdicodi commented 2 years ago

Hi there! Using the SepaDD as follows:

## Config file
        config = {
            "name": "name",
            "IBAN": "AD121111111111111111111",
            "creditor_id": "AD121111111111111111111",  # TODO update -  supplied by your bank or financial authority
            "BIC": "CRDAADAD",
            "batch": True,
            "domestic": True,
            "currency": "EUR",  # ISO 4217
        }
        sepa = SepaDD(config, schema="pain.001.001.03", clean=True)
        # Adding payments Iteratively

I get the following error message: Reason: Unexpected child with tag '{urn:iso:std:iso:20022:tech:xsd:pain.001.001.03}CstmrDrctDbtInitn' at position 1. Tag 'CstmrCdtTrfInitn' expected.

Has it happened to anyone else? Thanks!

raphaelm commented 1 year ago

You are using "SepaDD" (= direct debit) with pain.001.001.03 (= credit transfer), either use pain.008 instead or SepaTransfer, depending on whether you want to receive or send money.