From f900c4341168b02b29fc875446d91da1c1df09ed Mon Sep 17 00:00:00 2001 From: yniverz <88168412+yniverz@users.noreply.github.com> Date: Sun, 18 May 2025 12:34:43 +0000 Subject: [PATCH 1/5] add support for new pain message version 001.001.09 to simple instant payment method (requires merge #59 in sepaxml repo) --- fints/client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fints/client.py b/fints/client.py index 3fcb3b7..48262ce 100644 --- a/fints/client.py +++ b/fints/client.py @@ -827,7 +827,13 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str, "batch": False, "currency": "EUR", } - version = self._find_supported_sepa_version(['pain.001.001.03', 'pain.001.003.03']) + + version = self._find_supported_sepa_version([ + 'pain.001.003.03', + 'pain.001.001.09', + 'pain.001.001.03' + ]) + sepa = SepaTransfer(config, version) payment = { "name": recipient_name, From 4eb04e6cf4a7f790c507af4fc0cf4d06899ba54a Mon Sep 17 00:00:00 2001 From: yniverz <88168412+yniverz@users.noreply.github.com> Date: Mon, 19 May 2025 07:16:14 +0000 Subject: [PATCH 2/5] Make dest. bic optional in simple sepa transfer --- fints/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fints/client.py b/fints/client.py index 48262ce..221ea91 100644 --- a/fints/client.py +++ b/fints/client.py @@ -811,7 +811,7 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str, :param account: SEPAAccount to start the transfer from. :param iban: Recipient's IBAN - :param bic: Recipient's BIC + :param bic: Recipient's BIC (Can be None if domestic) :param recipient_name: Recipient name :param amount: Amount as a ``Decimal`` :param account_name: Sender account name @@ -838,12 +838,13 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str, payment = { "name": recipient_name, "IBAN": iban, - "BIC": bic, "amount": round(Decimal(amount) * 100), # in cents "execution_date": datetime.date(1999, 1, 1), "description": reason, "endtoend_id": endtoend_id, } + if bic: + payment["BIC"] = bic sepa.add_payment(payment) xml = sepa.export().decode() return self.sepa_transfer(account, xml, pain_descriptor="urn:iso:std:iso:20022:tech:xsd:"+version, instant_payment=instant_payment) From c45c4d41beb96e20e2913e59cb53479dbf5f062e Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 27 Nov 2025 13:33:06 +0100 Subject: [PATCH 3/5] Update sepaxml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 708fb6a..3315def 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "bleach", "mt-940", "requests", - "sepaxml~=2.1", + "sepaxml~=2.7", "enum-tools~=0.12.0", ] dynamic = ["version"] From a6b8e68f8e134dc9af494a37d86ee71ddbcee4aa Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 27 Nov 2025 13:36:27 +0100 Subject: [PATCH 4/5] remove pain.001.003 --- fints/client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fints/client.py b/fints/client.py index 221ea91..25cbd65 100644 --- a/fints/client.py +++ b/fints/client.py @@ -829,7 +829,6 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str, } version = self._find_supported_sepa_version([ - 'pain.001.003.03', 'pain.001.001.09', 'pain.001.001.03' ]) From 8549c0c43b1d4915dce7da69f36670103f0aa2d4 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 27 Nov 2025 13:39:22 +0100 Subject: [PATCH 5/5] Fix sepaxml version for tests --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c3c2949..89dc6bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ requests mt-940 -sepaxml==2.1.* +sepaxml==2.7.* enum-tools~=0.12.0 bleach