Skip to content

Commit 4eb04e6

Browse files
yniverzraphaelm
authored andcommitted
Make dest. bic optional in simple sepa transfer
1 parent f900c43 commit 4eb04e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fints/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str,
811811
812812
:param account: SEPAAccount to start the transfer from.
813813
:param iban: Recipient's IBAN
814-
:param bic: Recipient's BIC
814+
:param bic: Recipient's BIC (Can be None if domestic)
815815
:param recipient_name: Recipient name
816816
:param amount: Amount as a ``Decimal``
817817
:param account_name: Sender account name
@@ -838,12 +838,13 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str,
838838
payment = {
839839
"name": recipient_name,
840840
"IBAN": iban,
841-
"BIC": bic,
842841
"amount": round(Decimal(amount) * 100), # in cents
843842
"execution_date": datetime.date(1999, 1, 1),
844843
"description": reason,
845844
"endtoend_id": endtoend_id,
846845
}
846+
if bic:
847+
payment["BIC"] = bic
847848
sepa.add_payment(payment)
848849
xml = sepa.export().decode()
849850
return self.sepa_transfer(account, xml, pain_descriptor="urn:iso:std:iso:20022:tech:xsd:"+version, instant_payment=instant_payment)

0 commit comments

Comments
 (0)