iban4j icon indicating copy to clipboard operation
iban4j copied to clipboard

BIC Bankcode alphanumeric

Open nbrass opened this issue 2 years ago • 5 comments

Hi, I'm currently struggling with BIC validation (BicUtil.validate()) that throws me an error when validating BICs containing numeric values in the first four digits (bank code) of a BIC. I think the bank code can be alphanumeric as stated here: SWIFT BIC Standard

The ISO 9362 standard is available from ISO at www.iso.org.

The BIC is an 8 character code, defined as ‘business party identifier’, consisting of the business party prefix (4 alphanumeric), the country code as defined in ISO 3166-1 (2 alphabetic), and the business party suffix (2 alphanumeric).

The branch identifier is a 3 character optional element that can supplement the 8 character BIC, used to identify specific locations, departments, services or units of the same business party.

Can you please check this? Thanks in advance!

Best regards Norman

nbrass avatar Aug 28 '23 10:08 nbrass

Hi @nbrass, can you provide me with an example?

hajk1 avatar Aug 29 '23 07:08 hajk1

Hi @hajk1, sure. For example BicUtil.validate("1234DEFFXXX")

nbrass avatar Aug 29 '23 08:08 nbrass

Thanks @nbrass, you are right. I'm curious does this happen in the real world as well?

hajk1 avatar Sep 02 '23 14:09 hajk1

I've not seen it so far, but during test data generation we've found this issue.

nbrass avatar Sep 04 '23 07:09 nbrass

Hi, maybe it might be a good idea to make this configurable somehow. I also have not yet seen a BIC with numbers in the bank code. And at least in the SEPA area, there is no such BIC code (source: https://www.europeanpaymentscouncil.eu/sites/default/files/participants_export/sct/sct.csv) and banking software generally seems to validate against chars only (e.g. https://wise.com/gb/swift-codes/bic-swift-code-checker).

machajdik avatar Dec 19 '23 10:12 machajdik