IbanNet icon indicating copy to clipboard operation
IbanNet copied to clipboard

Support for Bank Identifiers for Polish (PL) IBANs

Open eluchsinger opened this issue 11 months ago • 3 comments

Is your feature request related to a problem? Please describe.

I’m trying to parse some Polish IBANs and noticed that Poland (PL) currently doesn’t support a Bank Identifier in your implementation. It seems to be the only country without support for bank identifiers. Is there a specific reason for this limitation?

I’ve seen other IBAN parsing services support Bank Identifiers for Poland. Reading what other services are doing, what IbanNet uses as Branch Identifier is being used as Bank Identifier there.

Let me know if you need assistance or how I can contribute to resolving this.

eluchsinger avatar Jan 22 '25 09:01 eluchsinger

I used whatever is in the spec datafile from SWIFT. So I am not sure what needs to be corrected as per your request.

https://www.swift.com/sites/default/files/files/iban-registry_3.pdf

Image

skwasjer avatar Mar 23 '25 15:03 skwasjer

I assume that IBAN checkers are using the Branch identifier as a bank identifier. I think that's technically incorrect. But maybe it's necessary as a workaround? Not sure what's right here.

eluchsinger avatar Mar 25 '25 16:03 eluchsinger

From Polish sources I've just checked, the 8 digits actually represent:

3 digits: bank code 4 digits: branch code 1 digit: check digit for the previous 7

It seems from the more generic sources, as well as SWIFT (and consequently IbanNet), either call the complete 8 digits branch or bank code because the IBAN spec itself does not lend itself well for this kind of distinction.

Even though IbanNet could technically 'extract' the 3 and 4 digits by customizing the spec, the check digit cannot be encapsulated and would be lost. It would also be problematic for the IbanBuilder API which would no longer work.

So yea, I think it is best to follow the SWIFT spec for now, until we get some more opinions/sources on this (ideally from people well informed on the Polish national banking system) and ideas how to solve it in IbanNet.

Keep in mind that IbanNet is a very generic API, and not very tailored for each individual country.

skwasjer avatar Mar 27 '25 13:03 skwasjer