schwifty icon indicating copy to clipboard operation
schwifty copied to clipboard

Turkish IBAN - Branch is empty string?

Open Ghost93 opened this issue 4 years ago • 5 comments

Hi Thanks for this library, it really helps :smiley: (and it has a nice name)

I have a problem regarding Turkey. Whenever I parse a Turkish IBAN the branch code is an empty string. I looked at the code and it seems like the branch part the start index and end index is the same - link to relevant part in json file.

Here's an example of a site that can decode the branch part given a Turkish IBAN - link.

Any ideas how I can achieve this decoding of the branch part as well using schwifty?

Thanks

Ghost93 avatar Nov 23 '20 15:11 Ghost93

Hello @Ghost93,

thank you for the issue report. I tried to use the validator you linked with an example IBAN from iban.com (TR320010009999901234567890), but couldn't find the branch information in the output. Which part specifically is supposed to be the branch identifier? When looking at the official IBAN registry, the branch identifier position within the BBAN is not provided for turkish IBANs. Also wikipedia does not indicate at which position a branch identifier could be located. Please let me know if you can give me more specific information about how the parsing result should look instead!

mdomke avatar Nov 25 '20 21:11 mdomke

Hi @mdomke You're correct, the validator I gave can identify good or bad IBAN values, and can identify the branch if its in the IBAN. Take TR470006200157200006299246 for instance. The result is:

BANKA BİLGİLERİ
Ad: GARANTİ BANKASI
Kod: 0062
Swift: TGBATRIS
Hesap No: 6299246

ŞUBE BİLGİLERİ
Ad: Şubesi
Kod: 1572
İl:
İlçe:
Tel: 0
Fax: 0
Adres:

First part is bank information, Second part is the branch information.

Ghost93 avatar Nov 26 '20 07:11 Ghost93

Here's another link that explains how to decode the branch code from the IBAN.

Ghost93 avatar Nov 29 '20 13:11 Ghost93

@mdomke In the meantime I created a fork of your repository with the relevant change for my specific use case. It's not the best solution - I just changed the generated file with the relevant indices. You can see it here - link.

Ghost93 avatar Dec 08 '20 06:12 Ghost93

Hej @Ghost93, from the link you provided I got the picture below image Would you mind explaining what the different sections mean? "SUBE KODU" is "Branch Code", "MÜSTERI NO" is "Customer Number" and "HESAP EK NO" is "Account Number" 🤷🏻‍♂️ ?

Edit: Sorry. I just realized that this issue is 2 years old, so this is rather a long shot to get a response from you 😅

mdomke avatar Jan 09 '24 22:01 mdomke