Hello,
I'm searching (free) PHP code to generate international IBAN and BIC from country code, account number and bank code.
I can find classes to generate German IBAN, but not international.
I can find hundreds of websites claiming that they can do (all with restrictions or no free API).
I can find expensive web-services with REST-API claiming to do so (untested).
I can find dozens of validation functions (nice, but not my need).
Is there a PHP class or module that allows this with no or little cost?
Problem: We sold a product to about 25 customers. The product has bank accounts and bank codes and country. I need to convert the numbers only once in a single shot during the next update, but all licence models force me to buy a licence for every customer (25 licences). This gets quite expensive!
Any idea (except studying the rules and write my own converter, which I do not have the time for)?
The dream: A PHP class module that takes country, bank account and bank code and simply returns IBAN and BIC.
Best,
Kukulkan
I'm searching PHP code to generate IBAN and BIC...
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: I'm searching PHP code to generate IBAN and BIC...
From Wikipedia, it is a massive task to cover internationally. IBAN. Looks like a DIY solution is close to impossible.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
Num3
- PureBasic Expert

- Posts: 2812
- Joined: Fri Apr 25, 2003 4:51 pm
- Location: Portugal, Lisbon
- Contact:
Re: I'm searching PHP code to generate IBAN and BIC...
This means it is impossible to generate a BIC on the fly, you must have a database with all registered BIC's.The Bank Identifier Code (BIC) formerly known as SWIFT code is a unique code to identify individual banks worldwide.
These codes are registered at SWIFT (Society for Worldwide Interbank Financial Telecommunication).
The BIC / SWIFT codes are used when transferring money between banks, particularly for international wire transfer.
The BIC / SWIFT codes consists of 8 or 11 characters, for example:
Country : Switzerland
Bank name : LLOYDS TSB BANK PLC ZURICH
BIC/SWIFT code : LOYDCHGGZCH
More info for BIC here: http://www.mobilefish.com/services/bic_ ... _swift.php
IBAN related info here: http://www.mobilefish.com/services/iban/iban.php
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: I'm searching PHP code to generate IBAN and BIC...
...yes and the snag with the IBAN number is the Basic Bank Account Number (BBAN), which is constructed in accordance with each individual country's rules - so a database for this is required also.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: I'm searching PHP code to generate IBAN and BIC...
Hello,
thanks for the information. All the information is freely available and I thought that someone converted the data to some PHP script (array) and did some routines to do the stuff. But it seems that no one did it until now
Best
Kukulkan
thanks for the information. All the information is freely available and I thought that someone converted the data to some PHP script (array) and did some routines to do the stuff. But it seems that no one did it until now
Best
Kukulkan
Re: I'm searching PHP code to generate IBAN and BIC...
Hi,
if it is only 25 users, maybe better to manually convert them using a webpage like this: http://creativeeyes.at/tools/iban.php
if it is only 25 users, maybe better to manually convert them using a webpage like this: http://creativeeyes.at/tools/iban.php
