Is there any existing library or script I can use to generate the BIC code from an IBAN bank account number (and other necessary information)?
I've searched the web, but found only IBAN generators.
Thanks in advance!
An IBAN contains a bank code but this is not branch specific information which means it is not possible to extract a BIC code from an IBAN.
How to find your account number within your IBAN. If you know your IBAN, finding your account number will be very straight forward. The account number is the last 8-digits of your IBAN, and will be the same as the account number associated with whatever account is receiving funds.
How do you find your SWIFT/BIC code? To locate your SWIFT/BIC code, check any paper or digital banking statements, or look at your account details on your online banking profile. You can also search for your BIC code using a digital SWIFT/BIC search tool by providing your country and bank location data.
A SWIFT BIC code refers to a specific financial institution in an international transaction, whereas an IBAN number identifies an individual account and the country of business. It's the global equivalent to a bank account and an ABA routing number in the United States.
Found solution for all IBAN accounts (I think):
https://openiban.com/validate/IBAN_NUMBER?getBIC=true
If you make a CURL call for example to that URL, you will get the Account bank info for free. Replace IBAN_NUMBER
with your IBAN account.
Example:
`https://openiban.com/validate/DE89370400440532013000?getBIC=true`
Result:
{ "valid": true, "messages": [], "iban": "DE89370400440532013000", "bankData": { "bankCode": "37040044", "name": "Commerzbank", "zip": "50447", "city": "Köln", "bic": "COBADEFFXXX" }, "checkResults": {} }
OpenIBAN has shut down it's API service due to the GDPR regulations posing unknown risks on the service provider. See the statement on openIBAN.com. There is also a link to a self-hosting guide included, see this github page.
Openiban is back online.
I do not think such library exists (at least for free).
The only reliable way to do this is by using the SWIFT IBAN Plus Directory (formely known as the SWIFT BICplusIBAN Directory.
This directory is provided by SWIFT, which is the IBAN registrar. With it you can match IBAN to various institutions information (including BIC).
The SWIFT IBAN Plus Directory is regularly updated by SWIFT with the latest data, is accessible as a file or via WebService APIs, and unfortunately is not available for free.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With