How to convert BIC & IBAN to account and sortcode
Asked Answered
M

4

8

Now that SEPA requirements are getting people used to BIC & IBAN, there are legacy system that cannot cope with this new data. Is there an algorithm or tool available for converting BIC & IBAN back to sort code and account?

Mulcahy answered 23/1, 2014 at 9:7 Comment(0)
S
8

Here is an example: enter image description here

from this website.

Samoyed answered 3/3, 2017 at 3:40 Comment(1)
This is not always correct. My sort code and account number is completely different from IBAN.Underbelly
H
4

Wikipedia has a list of IBAN formats by country, so it seems at least possible.

However, there is no complete algorithm for it - being a software developer, you can derive an algorithm from that input. Note that other countries might follow in the future, so you can expect more work (and hopefully not more exceptional cases of sort codes and accounts).

Regarding the tool or library, that's off-topic here on StackOverflow, but you might want to ask on Software Recommendations, though. Note that they have different requirements on how to ask questions, so you might want to read the tour first. Don't forget to mention the programming language.

Hardihood answered 25/9, 2014 at 18:58 Comment(0)
S
2

Well, a quick search pointed me at this page: http://www.business.hsbc.co.uk/1/2/international-business/iban-bic.

Looks to me like you can just extract appropriate substrings. Although, a bit more searching seems to indicate that the format may vary a bit depending on the country.

Syringa answered 23/1, 2014 at 9:10 Comment(0)
G
2

Both sort code and account number are present inside a United Kingdom or Ireland IBAN. You can simply substring like, PHP Examples:

$iban = "GB04BARC20474473160944";

$sort = substr($iban,8,6);
$account = substr($iban,14,8);


print "SortCode:" . $sort;
print "AccountNumber:" . $account;

The IBAN Calculator webservice has an API which digs up bank and branch information and so on. Also does check digit validation on the iban and sort/account.

But for simple extracting of the sort/account the substring is sufficient.

Gyrfalcon answered 23/8, 2016 at 9:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.