UK IBAN Checker XML API

The API returns a validation code, a validation description and account properties in XML format for the IBAN bank account provided as input.

Usage
Simply perform a GET call using this url with the API parameters described below:
https://www.bankaccountchecker.com/listener.php?key=<your_api_key>&password=<your_password>&output=xml&type=iban&bankaccount=GB29NWBK60161331926819
If you don't have an API key yet, just follow this link to register your free API key.

API parameters
Parameter Required Default Value
key Yes N/A API key provided with your account. Alternatively, use the 'guest' key but you will be restricted by the number of call per 24 hours.
password Yes N/A Password associated with the API key.
output No json json, xml
type Yes N/A iban
bankaccount Yes N/A The IBAN bankaccount you want to check.
Output
This is a sample of the output you will get in XML:
<?xml version="1.0"?>
<bankaccountchecker>
    <resultCode>01</resultCode>
    <resultDescription>IBAN is valid</resultDescription>
    <accountProperties>
        <checksum>29</checksum>
        <bban>NWBK60161331926819</bban>
        <bank>NWBK</bank>
        <country>GB</country>
        <branch>601613</branch>
        <account>true</account>
        <nationalchecksum></nationalchecksum>
    </accountProperties>
</bankaccountchecker>
Why do I need to register?

We are always trying to improve on our services and to do so we need to be able to tell who is querying what data and how often. This will enable us to fully optimize our limited resources to providing a more stable and reliable service to our users.

What is this API key and do I need it?

This API key is just a random string of characters which uniquely identifies each user. This is how we can track your usage and we perform security validation.

How do I get this API key?

This API key is free for everyone. You just have to go to here to register and a unique API key will be sent to your email address.

Php example
In this example, we are running the full test case suite using different type of call (POST and GET). You can download this PHP version of the script as well from our download page.
<?php
 
// Define end point URL
$url     = "https://www.bankaccountchecker.com/";
$service = "listener.php";
 
// Define parameters for all tests
$key         = "apiTest";
$password    = "apiTest";
$output      = "xml";
$type        = "iban";
 
// Start callAPI
callAPI('1',"IBAN Sample AL","01",$key,$password,$output,$type,"","AL47212110090000000235698741");
callAPI('2',"IBAN Sample AD","01",$key,$password,$output,$type,"","AD1200012030200359100100");
callAPI('3',"IBAN Sample AT","01",$key,$password,$output,$type,"","AT611904300234573201");
callAPI('4',"IBAN Sample AZ","01",$key,$password,$output,$type,"","AZ21NABZ00000000137010001944");
callAPI('5',"IBAN Sample BH","01",$key,$password,$output,$type,"","BH67BMAG00001299123456");
callAPI('6',"IBAN Sample BE","01",$key,$password,$output,$type,"","BE68539007547034");
callAPI('7',"IBAN Sample BA","01",$key,$password,$output,$type,"","BA391290079401028494");
callAPI('8',"IBAN Sample BR","01",$key,$password,$output,$type,"","BR9700360305000010009795493P1");
callAPI('9',"IBAN Sample BG","01",$key,$password,$output,$type,"","BG80BNBG96611020345678");
callAPI('10',"IBAN Sample CR","01",$key,$password,$output,$type,"","CR05015202001026284066");
callAPI('11',"IBAN Sample HR","01",$key,$password,$output,$type,"","HR1210010051863000160");
callAPI('12',"IBAN Sample CY","01",$key,$password,$output,$type,"","CY17002001280000001200527600");
callAPI('13',"IBAN Sample CZ","01",$key,$password,$output,$type,"","CZ6508000000192000145399");
callAPI('14',"IBAN Sample DK","01",$key,$password,$output,$type,"","DK5000400440116243");
callAPI('15',"IBAN Sample DO","01",$key,$password,$output,$type,"","DO28BAGR00000001212453611324");
callAPI('16',"IBAN Sample EE","01",$key,$password,$output,$type,"","EE382200221020145685");
callAPI('17',"IBAN Sample FO","01",$key,$password,$output,$type,"","FO6264600001631634");
callAPI('18',"IBAN Sample FI","01",$key,$password,$output,$type,"","FI2112345600000785");
callAPI('19',"IBAN Sample FR","01",$key,$password,$output,$type,"","FR1420041010050500013M02606");
callAPI('20',"IBAN Sample GE","01",$key,$password,$output,$type,"","GE29NB0000000101904917");
callAPI('21',"IBAN Sample DE","01",$key,$password,$output,$type,"","DE89370400440532013000");
callAPI('22',"IBAN Sample GI","01",$key,$password,$output,$type,"","GI75NWBK000000007099453");
callAPI('23',"IBAN Sample GR","01",$key,$password,$output,$type,"","GR1601101250000000012300695");
callAPI('24',"IBAN Sample GL","01",$key,$password,$output,$type,"","GL8964710001000206");
callAPI('25',"IBAN Sample GT","01",$key,$password,$output,$type,"","GT82TRAJ01020000001210029690");
callAPI('26',"IBAN Sample HU","01",$key,$password,$output,$type,"","HU42117730161111101800000000");
callAPI('27',"IBAN Sample IS","01",$key,$password,$output,$type,"","IS140159260076545510730339");
callAPI('28',"IBAN Sample IE","01",$key,$password,$output,$type,"","IE29AIBK93115212345678");
callAPI('29',"IBAN Sample IL","01",$key,$password,$output,$type,"","IL620108000000099999999");
callAPI('30',"IBAN Sample IT","01",$key,$password,$output,$type,"","IT60X0542811101000000123456");
callAPI('31',"IBAN Sample JO","01",$key,$password,$output,$type,"","JO94CBJO0010000000000131000302");
callAPI('32',"IBAN Sample KZ","01",$key,$password,$output,$type,"","KZ86125KZT5004100100");
callAPI('33',"IBAN Sample XK","01",$key,$password,$output,$type,"","XK051212012345678906");
callAPI('34',"IBAN Sample KW","01",$key,$password,$output,$type,"","KW81CBKU0000000000001234560101");
callAPI('35',"IBAN Sample LV","01",$key,$password,$output,$type,"","LV80BANK0000435195001");
callAPI('36',"IBAN Sample LB","01",$key,$password,$output,$type,"","LB62099900000001001901229114");
callAPI('37',"IBAN Sample LI","01",$key,$password,$output,$type,"","LI21088100002324013AA");
callAPI('38',"IBAN Sample LT","01",$key,$password,$output,$type,"","LT121000011101001000");
callAPI('39',"IBAN Sample LU","01",$key,$password,$output,$type,"","LU280019400644750000");
callAPI('40',"IBAN Sample MK","01",$key,$password,$output,$type,"","MK07250120000058984");
callAPI('41',"IBAN Sample MT","01",$key,$password,$output,$type,"","MT84MALT011000012345MTLCAST001S");
callAPI('42',"IBAN Sample MR","01",$key,$password,$output,$type,"","MR1300020001010000123456753");
callAPI('43',"IBAN Sample MU","01",$key,$password,$output,$type,"","MU17BOMM0101101030300200000MUR");
callAPI('44',"IBAN Sample MD","01",$key,$password,$output,$type,"","MD24AG000225100013104168");
callAPI('45',"IBAN Sample MC","01",$key,$password,$output,$type,"","MC5811222000010123456789030");
callAPI('46',"IBAN Sample ME","01",$key,$password,$output,$type,"","ME25505000012345678951");
callAPI('47',"IBAN Sample NO","01",$key,$password,$output,$type,"","NO9386011117947");
callAPI('48',"IBAN Sample PK","01",$key,$password,$output,$type,"","PK36SCBL0000001123456702");
callAPI('49',"IBAN Sample PS","01",$key,$password,$output,$type,"","PS92PALS000000000400123456702");
callAPI('50',"IBAN Sample PL","01",$key,$password,$output,$type,"","PL61109010140000071219812874");
callAPI('51',"IBAN Sample PT","01",$key,$password,$output,$type,"","PT50000201231234567890154");
callAPI('52',"IBAN Sample QA","01",$key,$password,$output,$type,"","QA58DOHB00001234567890ABCDEFG");
callAPI('53',"IBAN Sample RO","01",$key,$password,$output,$type,"","RO49AAAA1B31007593840000");
callAPI('54',"IBAN Sample LC","01",$key,$password,$output,$type,"","LC62HEMM000100010012001200023015");
callAPI('55',"IBAN Sample SM","01",$key,$password,$output,$type,"","SM86U0322509800000000270100");
callAPI('56',"IBAN Sample ST","01",$key,$password,$output,$type,"","ST68000100010051845310112");
callAPI('57',"IBAN Sample SA","01",$key,$password,$output,$type,"","SA0380000000608010167519");
callAPI('58',"IBAN Sample RS","01",$key,$password,$output,$type,"","RS35260005601001611379");
callAPI('59',"IBAN Sample SK","01",$key,$password,$output,$type,"","SK3112000000198742637541");
callAPI('60',"IBAN Sample SI","01",$key,$password,$output,$type,"","SI56263300012039086");
callAPI('61',"IBAN Sample ES","01",$key,$password,$output,$type,"","ES9121000418450200051332");
callAPI('62',"IBAN Sample SE","01",$key,$password,$output,$type,"","SE4550000000058398257466");
callAPI('63',"IBAN Sample CH","01",$key,$password,$output,$type,"","CH9300762011623852957");
callAPI('64',"IBAN Sample NL","01",$key,$password,$output,$type,"","NL91ABNA0417164300");
callAPI('65',"IBAN Sample TL","01",$key,$password,$output,$type,"","TL380080012345678910157");
callAPI('66',"IBAN Sample TN","01",$key,$password,$output,$type,"","TN5910006035183598478831");
callAPI('67',"IBAN Sample TR","01",$key,$password,$output,$type,"","TR330006100519786457841326");
callAPI('68',"IBAN Sample AE","01",$key,$password,$output,$type,"","AE070331234567890123456");
callAPI('69',"IBAN Sample GB","01",$key,$password,$output,$type,"","GB29NWBK60161331926819");
callAPI('70',"IBAN Sample VG","01",$key,$password,$output,$type,"","VG96VPVG0000012345678901");
 
// End callAPI
 
function callAPI($testId,$testDescription,$expectedResult,$key,$password,$output,$type,$sortcode,$bankaccount) {
 
global $url,$service;
 
// Output Test details
echo "====================================================================\r\n";
echo "Test ID : $testId\r\n";
echo "Sort code : $sortcode\r\n";
echo "Bank account : $bankaccount\r\n";
echo "Test Description : $testDescription\r\n";
echo "Expected Result : $expectedResult\r\n\r\n";
 
// Call with Post with url encoded string post parameters
$ch = curl_init() ;
curl_setopt($ch, CURLOPT_URL,$url . $service);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "key=$key&password=$password&output=$output&type=$type&sortcode=$sortcode&bankaccount=$bankaccount");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 
$result = curl_exec($ch);
 
if (curl_errno($ch)) {
    echo 'Curl error: ' . curl_error($ch) . "\r\n";
    $info = curl_getinfo($ch);
    print_r($info);
    curl_close($ch);
    return;
}
 
curl_close($ch);
 
echo "Call with POST with url encoded string\r\nResult:\r\n";
echo $result . "\r\n";
 
 
// Analyse result
switch($output) {
    case "xml" :
        $resultXml = simplexml_load_string($result);
        if ($resultXml === false) {
            $resultCode = "XX";
            $resultDescription = "Invalid xml returned";
        }
        else {
            $resultCode = $resultXml->resultCode;
            $resultDescription = $resultXml->resultDescription;
        }
        break;
}
 
// Display Result
echo "Result Code : " . $resultCode . "\r\n";
echo "Result Dewscription : " . $resultDescription . "\r\n";
if ($expectedResult != $resultXml->resultCode) {
    echo "*** ERROR ***\r\n";
}
echo "\r\n";
 
//=====================================================================
// Call with Post with post parameters in array
$ch = curl_init() ;
curl_setopt($ch, CURLOPT_URL,$url . $service);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('key' => $key , 'password' => $password , 'output' => $output , 'type' => $type , 'sortcode' => $sortcode , 'bankaccount' => $bankaccount ));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Required to remove "Expect: 100-continue" from the header sent
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
 
$result = curl_exec($ch);
 
if (curl_errno($ch)) {
    echo 'Curl error: ' . curl_error($ch) . "\r\n";
    $info = curl_getinfo($ch);
    print_r($info);
    curl_close($ch);
    return;
}
 
curl_close($ch);
 
echo "Call with POST with array\r\nResult:\r\n";
echo $result . "\r\n";
 
// Analyse result
switch($output) {
    case "xml" :
        $resultXml = simplexml_load_string($result);
        if ($resultXml === false) {
            $resultCode = "XX";
            $resultDescription = "Invalid xml returned";
        }
        else {
            $resultCode = $resultXml->resultCode;
            $resultDescription = $resultXml->resultDescription;
        }
        break;
}
 
// Display Result
echo "Result Code : " . $resultCode . "\r\n";
echo "Result Dewscription : " . $resultDescription . "\r\n";
if ($expectedResult != $resultXml->resultCode) {
    echo "*** ERROR ***\r\n";
}
echo "\r\n";
 
//=====================================================================
// Call with Get
$ch = curl_init() ;
curl_setopt($ch, CURLOPT_URL,$url . $service . "?key=$key&password=$password&output=$output&type=$type&sortcode=$sortcode&bankaccount=$bankaccount");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 
$result = curl_exec($ch);
 
if (curl_errno($ch)) {
    echo 'Curl error: ' . curl_error($ch) . "\r\n";
    $info = curl_getinfo($ch);
    print_r($info);
    curl_close($ch);
    return;
}
 
curl_close($ch);
 
echo "Call with GET\r\nResult:\r\n";
echo $result . "\r\n";
 
// Analyse result
switch($output) {
    case "xml" :
        $resultXml = simplexml_load_string($result);
        if ($resultXml === false) {
            $resultCode = "XX";
            $resultDescription = "Invalid xml returned";
        }
        else {
            $resultCode = $resultXml->resultCode;
            $resultDescription = $resultXml->resultDescription;
        }
        break;
}
 
// Display Result
echo "Result Code : " . $resultCode . "\r\n";
echo "Result Dewscription : " . $resultDescription . "\r\n";
if ($expectedResult != $resultXml->resultCode) {
    echo "*** ERROR ***\r\n";
}
echo "\r\n";
 
}
?>