• Contact
  • en EN
    • de Deutsch
    • fr Français
    • it Italiano
    • nl Dutch
    • es Español
    • pt Português
    • pl Polski
    • sv Svenska
    • fi Suomi
    • da Dansk
    • no Norsk
    • hu Magyar
    • el Eλληνική
    • cs Čeština
    • sl Slovenščina
    • hr Hrvatski
    • sk Slovenský
    • lv Latviešu
    • lt Lietuvių
    • et Eesti
    • sr Srpski
    • tr Türkçe
    • ru Русский
    • bg Български
    • uk Українська
    • ar العربية
    • he עברית
    • ja 日本語
    • ko 한국어
    • zh-TW 繁體中文
  • Login
  • Request a demo
IBAN Logo
  • Validate IBAN
  • Calculate IBAN
  • Products
  • Why IBAN
  • Developers
  • Pricing
  • 1. Introduction
  • 2. Features
  • 3. API Endpoints
  • 4. BANK CODE API INPUT
  • 4.1 BANK CODE API OUTPUT
  • 4.2 BANK CODE API ERRORS
  • 5. BIC API INPUT
  • 5.1 BIC API OUTPUT
  • 5.2 BIC API ERRORS
  • 6. STRUCTURE API INPUT
  • 6.1 STRUCTURE API OUTPUT
  • 6.2 STRUCTURE API ERRORS
  • 7. Data Fields Definitions
  • 8. Supported Countries

Bank Suite API Documentation


This API is part of our Bank Suite service

1. Introduction


The Bank Suite is a web service which provides validation capabilities for bank codes and account numbers.
Designed mainly to provide bank code and account number validation for countries which do not use the IBAN standard (see list of countries ).
Powered by the one of the largest and up to date bank code directories in the industry it is a powerful suit of services helping businesses improve the quality of international payments



2. Features


Some of the key features and benefits of the Bank Suite service are:

  • Global Coverage
  • Validate Bank Codes for non-IBAN and IBAN countries
  • Validate domestic bank code and account number check digits
  • Monthly updated world bank directory covering 195 countries
  • Query the bank suite directory by Bank Code(National ID)
  • Query the bank suite directory by BIC code
  • Validate Bank Code structure
  • Validate Bank Code length
  • Identify BIC code related to bank routing/sorting code


3. API Endpoints



The Bank Suite API provides the following endpoints:

Main Endpoint - Validate bank code (NID)
http://api.iban.com/clients/api/banksuite/nid/

This endpoint is used to validate bank codes and retrieve information about the bank and branch they belong.
It also provides an additional feature to validate bank account numbers by checking their structure, formatting, length and check digit.

BIC Endpoint - Search by BIC Code
http://api.iban.com/clients/api/banksuite/bic/

This endpoint performs validation on a provided BIC code and performs a search in our banking directory.
If the BIC is currently active and in use, the system will provide bank code and bank and branch information related to this BIC

Structure Endpoint - Information about format and structure.
http://api.iban.com/clients/api/banksuite/structure/

The structure endpoint provides information about bank code and account number structure for each specific country.

4. Bank Code API Input

The REST API accepts both HTTP GET or POST requests.
The input parameters are listed in the table below:

Field Name Length Type Description
nid Max 15 String The Bank Code sent to our system for validation.
account Max 50 String (optional) Account number sent for validation.
country_iso Max 2 String 2 letter ISO Code of the country. List of supported countries in Section 8. Supported Countries
api_key 128 String Your personal API key.
format 5 String Format of the response XML and JSON supported.

*To obtain an API key, please contact us at contact@iban.com or purchase a subscription at our order page

EXAMPLE – Validate a Bank Code
Feel free to use the sample code below to test the API in the most common programming languages.

  • CURL
  • PHP
  • RUBY
  • PYTHON
  • Perl
  • JAVA
  • .NET
  • NODE
curl "https://api.iban.com/clients/api/banksuite/nid/" \
    -X POST \
    -d format=json \
	-d api_key=[YOUR_API_KEY] \
	-d country_iso=US
	-d nid=322271627
<?php
$curl = curl_init();

$post = [
    'format' => 'json',
    'api_key' => '[YOUR_API_KEY]',
    'country_iso'   => 'US',
	'nid' => '322271627'
];

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.iban.com/clients/api/banksuite/nid/',
	CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => $post
));

$output = curl_exec($curl);
$result = json_decode($output);

print_r($result);

curl_close($curl);
?>
require 'net/http'

uri = URI('https://api.iban.com/clients/api/banksuite/')

res = Net::HTTP.post_form(uri, "format" => "json", "api_key" => "[YOUR_API_KEY]","country_iso" => "US","nid" => "322271627")

puts res.body
import requests

post_data = {'format':'json', 'api_key':'[YOUR_API_KEY]','country_iso':'US','nid':'322271627'}

response = requests.post('https://api.iban.com/clients/api/banksuite/nid/',post_data)
print(response.text)
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
my $server_endpoint = "https://api.iban.com/clients/api/banksuite/nid/";

my $format = 'json';
my $api_key = '[YOUR_API_KEY]';
my $country_iso = 'US';
my $nid = '322271627';


my $req = HTTP::Request->new( POST => $server_endpoint );
$req->content_type('application/x-www-form-urlencoded');

my $post_data = 'format=' . $format . '&api_key=' . $api_key . '&country_iso=' . $country_iso . '&nid=' . $nid;

$req->content($post_data);

my $resp = $ua->request($req);

if ( $resp->is_success ) {
    my $message = $resp->decoded_content;
	print $message;
}

JAVA

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import org.json.simple.JSONObject;
import org.json.simple.JSONArray;
import org.json.simple.parser.ParseException;
import org.json.simple.parser.JSONParser;


public class ibanapi {

	private final String USER_AGENT = "API Client/1.0";

	public static void main(String[] args) throws Exception {

		ibanapi http = new ibanapi();

		
		System.out.println("\nTesting API - Send API POST request");
		http.sendPost();

	}

	// HTTP POST request
	private void sendPost() throws Exception {

		String url = "https://api.iban.com/clients/api/banksuite/nid/";
		URL obj = new URL(url);
		HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();

		//add reuqest header
		con.setRequestMethod("POST");
		con.setRequestProperty("User-Agent", USER_AGENT);
		con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");

		String urlParameters = "api_key=[YOUR_API_KEY]&format=json&country_iso=US&nid=322271627";

		// Send post request
		con.setDoOutput(true);
		DataOutputStream wr = new DataOutputStream(con.getOutputStream());
		wr.writeBytes(urlParameters);
		wr.flush();
		wr.close();

		int responseCode = con.getResponseCode();
		System.out.println("\nSending 'POST' request to URL : " + url);
		System.out.println("Post parameters : " + urlParameters);
		System.out.println("Response Code : " + responseCode);

		BufferedReader in = new BufferedReader(
		new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();

		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print result
		System.out.println(response.toString());

	}

}

.NET

public static void Main(string[] args)
		{						
			var request = (HttpWebRequest)WebRequest.Create("https://api.iban.com/clients/api/banksuite/nid/");
 
			var postData = "api_key=[YOUR_API_KEY]";
			 postData += "&format=json";
			 postData += "&country_iso=US";
			 postData += "&nid=322271627";
			 
			var data = Encoding.ASCII.GetBytes(postData);
			 
			request.Method = "POST";
			request.ContentType = "application/x-www-form-urlencoded";
			request.ContentLength = data.Length;
			 
			using (var stream = request.GetRequestStream())
			{
			 stream.Write(data, 0, data.Length);
			}
			 
			var response = (HttpWebResponse)request.GetResponse();
			 
			var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
			
			Console.WriteLine(responseString);
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
		}

NODE

var request = require('request');

var headers = {
    'User-Agent':       'IBAN API Client/0.0.1',
    'Content-Type':     'application/x-www-form-urlencoded'
}

var options = {
    url: 'https://api.iban.com/clients/api/banksuite/nid/',
    method: 'POST',
    headers: headers,
    form: {'api_key': '[YOUR_API_KEY]', 'format': 'json', 'country_iso': 'US', 'nid': '322271627'}
}

request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
     
		var data = JSON.parse(body);

		console.log(data.error);
		
		console.log("Query Status: " + data.success);
		console.log("Bank Code Valid: " + data.nid_valid);
		console.log("Bank Name: " + data.directory_results.institution_name);
		console.log("Bank BIC: " + data.directory_results.bic);
    }
})


An example usage of the BankSuite API with a GET request can be:

https://api.iban.com/clients/api/banksuite/nid/?format=json&api_key=[API_KEY]&country_iso=US&nid=322271627

Where:
  • key is your API key
  • NID is the bank code sent for validation by the API module.
  • xml is the response format. Also a json keyword can be specified for json formatted response.

Once an HTTP GET or POST request is made with the correct API key, the system will return the results in the specified format.

4.1 Bank Code API Output

An XSD Schema of the API’s response can be found below:
XSD Schema for NID endpoint: download


The API results are delivered in JSON or XML format for maximum usability. Find below descriptions for the JSON properties returned by the API:

Object Type Description
QUERY Array Contains the user supplied input parameters.
SUCCESS Boolean Indicates a true or false indicating if the query succeeded
ACCOUNT_VALID Boolean True or False. Indicates if the account number supplied has passed all validations
NID_VALID Boolean True or False. Indicates if the bank code has passed all validations
RECORDS_FOUND Integer Indicates the number of records found in the bank directory. If more than one, you may use the 'limit' parameter to retrieve multiple records for the same bank code
RECORDS_DISPLAYED Integer Indicates the number of records displayed in the 'directory_results' object. By default we display one record. With the 'limit' parameter, you can retrieve multiple
DIRECTORY_RESULTS Array This object contains the data retrieved from our bank directory for the respective bank code. You may find a detailed description of this object in Section 7 Data Field Definitions
ERROR Object Provides error code and description if an error occurs. For descriptions, please refer to Section 4.2 Bank Code API Errors


A sample JSON reply from the API for a IBAN validation query would be:

{
    "query": {
        "country_iso": "DE",
        "nid": "37040044",
        "account": "3901190310"
    },
    "success": true,
    "account_valid": false,
    "nid_valid": true,
    "records_found": "17",
    "records_displayed": 1,
    "directory_results": [
        {
            "office_type": "DB",
            "legal_type": "B",
            "institution_status": "BANK",
            "iso_lei_code": "",
            "bic8": "COBADEFF",
            "branch_bic": "366",
            "bic": "COBADEFF366",
            "chips_uid": "",
            "national_id": "37040044",
            "connected_bic": "COBADEFF366",
            "institution_name": "COMMERZBANK AG",
            "branch_information": "Commerzbank Pulheim",
            "pob_number": "",
            "street_address_1": "KAISERSTRASSE 16",
            "street_address_2": "",
            "street_address_3": "",
            "street_address_4": "",
            "city": "FRANKFURT AM MAIN",
            "cps": "HESSE",
            "zip_code": "60261",
            "country_name": "GERMANY",
            "iso_country_code": "DE",
            "subtype_indicator": "SUPE",
            "network_connectivity": "CNN",
            "service_codes": "EBAERPFINTG+"
        }
    ],
    "error": {
        "code": "813",
        "message": "Invalid Account Check Digit"
    }
}



4.2 Bank Code API Errors

We utilize two types of errors for this endpoint.
"Query Failed" error indicates that validations were not carried out.
"Validation failed" error indicates that the bank code or account number submitted has failed a validation step.

Error Code HTTP Status Code Type Message
301403Query failedAPI Key is invalid
305403Query failedIP Address not allowed
304403Query failedYou have no access to this API
302403Query failedSubscription expired
303403Query failedNo queries available
306400Query failedBad Request. Required minimum parameters: api_key; format; iso; nid
806400Query failedInvalid value for 'limit' parameter
500500Query failedInternal Server Error
801200Validation failedInvalid Characters in NID
802200Validation failedCountry ISO code invalid
803200Validation failedUnsupported country ISO code
804200Validation failedNID length is not correct for US Accepted length for US: 9 characters.
805200Validation failedInvalid NID format. Example: 211770093
400200Validation failedBankCode(NID) not found in the official directory
809200Validation failedInvalid Characters in account
810200Validation failedCountry ISO code invalid
811200Validation failedAccount Number length is not correct for US
812200Validation failedInvalid Account format. Example: 39581126
813200Validation failedInvalid Account Check Digit
814200Validation failedInvalid Bank Code/NID Check Digit

5. BIC API Input

The BIC Code endpoint is designed to locate a bank code from a given BIC code in the Bank Suite directory.
The input parameters are listed in the table below:

Field Name Length Type Description
bic Max 11 String The BIC sent to our system for validation and identification.
api_key 128 String Your personal API key.
format 5 String Format of the response XML and JSON supported.

*To obtain an API key, please contact us at contact@iban.com or purchase a subscription at our order page

EXAMPLE – Validate and lookup BIC
Feel free to use the sample code below to test the API in the most common programming languages.

  • CURL
  • PHP
  • RUBY
  • PYTHON
  • Perl
  • JAVA
  • .NET
  • NODE
curl "https://api.iban.com/clients/api/banksuite/bic/" \
    -X POST \
    -d format=json \
	-d api_key=[YOUR_API_KEY] \
	-d bic=BARCGB22XXX
<?php
$curl = curl_init();

$post = [
    'format' => 'json',
    'api_key' => '[YOUR_API_KEY]',
	'bic' => 'BARCGB22XXX'
];

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.iban.com/clients/api/banksuite/bic/',
	CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => $post
));

$output = curl_exec($curl);
$result = json_decode($output);

print_r($result);

curl_close($curl);
?>
require 'net/http'

uri = URI('https://api.iban.com/clients/api/banksuite/bic/')

res = Net::HTTP.post_form(uri, "format" => "json", "api_key" => "[YOUR_API_KEY]","bic" => "BARCGB22XXX")

puts res.body
import requests

post_data = {'format':'json', 'api_key':'[YOUR_API_KEY]','bic':'BARCGB22XXX'}

response = requests.post('https://api.iban.com/clients/api/banksuite/bic/',post_data)
print(response.text)
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
my $server_endpoint = "https://api.iban.com/clients/api/banksuite/bic/";

my $format = 'json';
my $api_key = '[YOUR_API_KEY]';
my $bic = 'BARCGB22XXX';


my $req = HTTP::Request->new( POST => $server_endpoint );
$req->content_type('application/x-www-form-urlencoded');

my $post_data = 'format=' . $format . '&api_key=' . $api_key . '&bic=' . $bic;

$req->content($post_data);

my $resp = $ua->request($req);

if ( $resp->is_success ) {
    my $message = $resp->decoded_content;
	print $message;
}

JAVA

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import org.json.simple.JSONObject;
import org.json.simple.JSONArray;
import org.json.simple.parser.ParseException;
import org.json.simple.parser.JSONParser;


public class ibanapi {

	private final String USER_AGENT = "API Client/1.0";

	public static void main(String[] args) throws Exception {

		ibanapi http = new ibanapi();

		
		System.out.println("\nTesting API - Send API POST request");
		http.sendPost();

	}

	// HTTP POST request
	private void sendPost() throws Exception {

		String url = "https://api.iban.com/clients/api/banksuite/bic/";
		URL obj = new URL(url);
		HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();

		//add reuqest header
		con.setRequestMethod("POST");
		con.setRequestProperty("User-Agent", USER_AGENT);
		con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");

		String urlParameters = "api_key=[YOUR_API_KEY]&format=json&bic=BARCGB22XXX";

		// Send post request
		con.setDoOutput(true);
		DataOutputStream wr = new DataOutputStream(con.getOutputStream());
		wr.writeBytes(urlParameters);
		wr.flush();
		wr.close();

		int responseCode = con.getResponseCode();
		System.out.println("\nSending 'POST' request to URL : " + url);
		System.out.println("Post parameters : " + urlParameters);
		System.out.println("Response Code : " + responseCode);

		BufferedReader in = new BufferedReader(
		new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();

		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print result
		System.out.println(response.toString());

	}

}

.NET

public static void Main(string[] args)
		{						
			var request = (HttpWebRequest)WebRequest.Create("https://api.iban.com/clients/api/banksuite/bic/");
 
			var postData = "api_key=[YOUR_API_KEY]";
			 postData += "&format=json";
			 postData += "&bic=BARCGB22XXX";
			 
			var data = Encoding.ASCII.GetBytes(postData);
			 
			request.Method = "POST";
			request.ContentType = "application/x-www-form-urlencoded";
			request.ContentLength = data.Length;
			 
			using (var stream = request.GetRequestStream())
			{
			 stream.Write(data, 0, data.Length);
			}
			 
			var response = (HttpWebResponse)request.GetResponse();
			 
			var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
			
			Console.WriteLine(responseString);
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
		}

NODE

var request = require('request');

var headers = {
    'User-Agent':       'IBAN API Client/0.0.1',
    'Content-Type':     'application/x-www-form-urlencoded'
}

var options = {
    url: 'https://api.iban.com/clients/api/banksuite/bic/',
    method: 'POST',
    headers: headers,
    form: {'api_key': '[YOUR_API_KEY]', 'format': 'json', 'bic': 'BARCGB22XXX'}
}

request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
     
		var data = JSON.parse(body);

		console.log(data.error);
		
		console.log("Query Status: " + data.success);
		console.log("Bank Code Valid: " + data.bic_valid);
		console.log("Bank Name: " + data.directory_results.institution_name);
		console.log("Bank BIC: " + data.directory_results.bic);
    }
})


An example usage of the BankSuite API with a GET request can be:

https://api.iban.com/clients/api/banksuite/bic/?format=json&api_key=[API_KEY]&bic=BARCGB22XXX

Where:
  • key is your API key
  • BIC code sent for validation by the API module.
  • xml is the response format. Also a json keyword can be specified for json formatted response.

Once an HTTP GET or POST request is made with the correct API key, the system will return the results in the specified format.

5.1 BIC API Output

An XSD Schema of the API’s response can be found below:
XSD Schema for BIC endpoint: download


The API results are delivered in JSON or XML format for maximum usability. Find below descriptions for the JSON properties returned by the API:

Object Type Description
QUERY Array Contains the user supplied input parameters.
SUCCESS Boolean Indicates a true or false indicating if the query succeeded
BIC_VALID Boolean True or False. Indicates if the submitted BIC have passed all validations
RECORDS_FOUND Integer Indicates the number of records found in the bank directory. If more than one, you may use the 'limit' parameter to retrieve multiple records for the same bank code
RECORDS_DISPLAYED Integer Indicates the number of records displayed in the 'directory_results' object. By default we display one record. With the 'limit' parameter, you can retrieve multiple
DIRECTORY_RESULTS Array This object contains the data retrieved from our bank directory for the respective bank code. You may find a detailed description of this object in Section 7 Data Field Definitions
ERROR Object Provides error code and description if an error occurs. For descriptions, please refer to Section 5.2 BIC API Errors


A sample JSON reply from the API for a IBAN validation query would be:
{
    "query": {
        "bic": "CHASUS33CON"
    },
    "success": true,
    "bic_valid": true,
    "records_found": "1",
    "records_displayed": 1,
    "directory_results": [
        {
            "office_type": "DB",
            "legal_type": "B",
            "institution_status": "BANK",
            "iso_lei_code": "",
            "bic8": "CHASUS33",
            "branch_bic": "CON",
            "bic": "CHASUS33CON",
            "chips_uid": "",
            "national_id": "",
            "connected_bic": "CHASUS33CON",
            "institution_name": "JPMORGAN CHASE BANK, N.A.",
            "branch_information": "",
            "pob_number": "",
            "street_address_1": "",
            "street_address_2": "",
            "street_address_3": "",
            "street_address_4": "",
            "city": "NEW YORK",
            "cps": "NY",
            "zip_code": "",
            "country_name": "UNITED STATES OF AMERICA",
            "iso_country_code": "US",
            "subtype_indicator": "SUPE",
            "network_connectivity": "CNN",
            "service_codes": "EB+FIN"
        }
    ]
}



5.2 BIC API Errors

We utilize two types of errors for this endpoint.
"Query Failed" error indicates that validations were not carried out.
"Validation failed" error indicates that the bank code or account number submitted has failed a validation step.

Error Code HTTP Status Code Type Message
301403Query failedAPI Key is invalid
305403Query failedIP Address not allowed
304403Query failedYou have no access to this API
302403Query failedSubscription expired
303403Query failedNo queries available
306400Query failedBad Request. Required minimum parameters: api_key; format; iso; nid
806400Query failedInvalid value for 'limit' parameter
500500Query failedInternal Server Error
807200Validation failedInvalid Characters in BIC
808200Validation failedBIC length is not correct. BIC code must be 8 or 11 characters long
400200Validation failedBIC not found in official directory

6. STRUCTURE API Input

The Structure endpoint is designed to provide bank code formatting information for a specified country code.
The input parameters are listed in the table below:

Field Name Length Type Description
country_iso 2 String The 2 letter ISO country code submitted by the client
api_key 128 String Your personal API key.
format 5 String Format of the response XML and JSON supported.

*To obtain an API key, please contact us at contact@iban.com or purchase a subscription at our order page

EXAMPLE – Retrieve Bank Code and Account Number format and structure for a specified country
Feel free to use the sample code below to integrate the API in the most common programming languages.

  • CURL
  • PHP
  • RUBY
  • PYTHON
  • Perl
  • JAVA
  • .NET
  • NODE
curl "https://api.iban.com/clients/api/banksuite/structure/" \
    -X POST \
    -d format=json \
	-d api_key=[YOUR_API_KEY] \
	-d country_iso=US
<?php
$curl = curl_init();

$post = [
    'format' => 'json',
    'api_key' => '[YOUR_API_KEY]',
    'country_iso'   => 'US',
];

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.iban.com/clients/api/banksuite/structure/',
	CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => $post
));

$output = curl_exec($curl);
$result = json_decode($output);

print_r($result);

curl_close($curl);
?>
require 'net/http'

uri = URI('https://api.iban.com/clients/api/banksuite/')

res = Net::HTTP.post_form(uri, "format" => "json", "api_key" => "[YOUR_API_KEY]","country_iso" => "US")

puts res.body
import requests

post_data = {'format':'json', 'api_key':'[YOUR_API_KEY]','country_iso':'US'}

response = requests.post('https://api.iban.com/clients/api/banksuite/structure/',post_data)
print(response.text)
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
my $server_endpoint = "https://api.iban.com/clients/api/banksuite/structure/";

my $format = 'json';
my $api_key = '[YOUR_API_KEY]';
my $country_iso = 'US';


my $req = HTTP::Request->new( POST => $server_endpoint );
$req->content_type('application/x-www-form-urlencoded');

my $post_data = 'format=' . $format . '&api_key=' . $api_key . '&country_iso=' . $country_iso ;

$req->content($post_data);

my $resp = $ua->request($req);

if ( $resp->is_success ) {
    my $message = $resp->decoded_content;
	print $message;
}

JAVA

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import org.json.simple.JSONObject;
import org.json.simple.JSONArray;
import org.json.simple.parser.ParseException;
import org.json.simple.parser.JSONParser;


public class ibanapi {

	private final String USER_AGENT = "API Client/1.0";

	public static void main(String[] args) throws Exception {

		ibanapi http = new ibanapi();

		
		System.out.println("\nTesting API - Send API POST request");
		http.sendPost();

	}

	// HTTP POST request
	private void sendPost() throws Exception {

		String url = "https://api.iban.com/clients/api/banksuite/structure/";
		URL obj = new URL(url);
		HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();

		//add reuqest header
		con.setRequestMethod("POST");
		con.setRequestProperty("User-Agent", USER_AGENT);
		con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");

		String urlParameters = "api_key=[YOUR_API_KEY]&format=json&country_iso=US";

		// Send post request
		con.setDoOutput(true);
		DataOutputStream wr = new DataOutputStream(con.getOutputStream());
		wr.writeBytes(urlParameters);
		wr.flush();
		wr.close();

		int responseCode = con.getResponseCode();
		System.out.println("\nSending 'POST' request to URL : " + url);
		System.out.println("Post parameters : " + urlParameters);
		System.out.println("Response Code : " + responseCode);

		BufferedReader in = new BufferedReader(
		new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();

		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print result
		System.out.println(response.toString());

	}

}

.NET

public static void Main(string[] args)
		{						
			var request = (HttpWebRequest)WebRequest.Create("https://api.iban.com/clients/api/banksuite/structure/");
 
			var postData = "api_key=[YOUR_API_KEY]";
			 postData += "&format=json";
			 postData += "&country_iso=US";
			 
			var data = Encoding.ASCII.GetBytes(postData);
			 
			request.Method = "POST";
			request.ContentType = "application/x-www-form-urlencoded";
			request.ContentLength = data.Length;
			 
			using (var stream = request.GetRequestStream())
			{
			 stream.Write(data, 0, data.Length);
			}
			 
			var response = (HttpWebResponse)request.GetResponse();
			 
			var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
			
			Console.WriteLine(responseString);
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
		}

NODE

var request = require('request');

var headers = {
    'User-Agent':       'IBAN API Client/0.0.1',
    'Content-Type':     'application/x-www-form-urlencoded'
}

var options = {
    url: 'https://api.iban.com/clients/api/banksuite/structure/',
    method: 'POST',
    headers: headers,
    form: {'api_key': '[YOUR_API_KEY]', 'format': 'json', 'country_iso': 'US'}
}

request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
     
		var data = JSON.parse(body);

		console.log(data.error);
		
		console.log("Query Status: " + data.success);
		console.log("Bank Code Valid: " + data.national_id_format.LENGTH);
		
    }
})


An example usage of the BankSuite API with a GET request can be:

https://api.iban.com/clients/api/banksuite/structure/?format=json&api_key=[API_KEY]&country_iso=GB

Where:
  • key is your API key
  • country_iso is the 2 letter ISO country code you need the formatting data for.
  • xml is the response format. Also a json keyword can be specified for json formatted response.

Once an HTTP GET or POST request is made with the correct API key, the system will return the results in the specified format.

6.1 Structure API Output

An XSD Schema of the API’s response can be found below:
XSD Schema for Structure endpoint: download


The API results are delivered in JSON or XML format for maximum usability. Find below descriptions for the JSON properties returned by the API:

Object Type Description
success Boolean Indicates a true or false indicating if the query succeeded
national_id_format Object This object contains data for the format and structure of the Bank Code
account_number_format Object This object contains information about the structure, length and formatting of the domestic bank account number for the specified country.
error Object Provides error code and description if an error occurs. For descriptions, please refer to Section 6.2 Structure API Errors


A sample JSON reply from the API for a IBAN validation query would be:
{
    "success": true,
    "national_id_format": [
        {
            "COUNTRY_CODE": "US",
            "COUNTRY_NAME": "UNITED STATES OF AMERICA",
            "NATIONAL_ID_LOCAL_NAME": "Routing Number",
            "NATIONAL_ID_LOCAL_ACRONYM": "ABA",
            "CLEARING_SYSTEM": "American Bankers Association (ABA)",
            "EXAMPLE": "211770093",
            "LETTER_FORMAT": "BBBBIIIIK",
            "ELEMENTS": "BANK_CODE,INSTITUTION_CODE,CHECKSUM",
            "LENGTH": "9",
            "LENGTH_IN_DB": "9"
        }
    ],
    "account_number_format": [
        {
            "ISO_COUNTRY_CODE": "US",
            "COUNTRY_NAME": "UNITED STATES OF AMERICA",
            "ACCOUNT_NB_TYPE": "Account number - Standard",
            "ACCOUNT_NB_LOCAL_NAME": "Account number",
            "EXAMPLE": "1000248938",
            "LETTER_FORMAT": "AAAAAAAAAA",
            "ELEMENTS": "ACCOUNT",
            "MIN_LENGTH": "9",
            "MAX_LENGTH": "10"
        }
    ]
}



6.2 Structure API Errors

The structure endpoint can return any of the following errors:


Error Code HTTP Status Code Type Message
301403Query failedAPI Key is invalid
305403Query failedIP Address not allowed
304403Query failedYou have no access to this API
302403Query failedSubscription expired
303403Query failedNo queries available
306400Query failedBad Request. Required minimum parameters: api_key; format; iso; nid
806400Query failedInvalid value for 'limit' parameter
500500Query failedInternal Server Error
802400Query failedCountry ISO code invalid
400400Query failedISO Country Code not found in registry

7. Data Field Definitions




The data field definitions section is only available for licensed users.
To purchase a license for the Bank Suite service, please visit our pricing page



8. Supported Countries

The table below provides a quick reference of the countries which the Bank Suite service covers.



ISO Country Account validation Length
ADANDORRAn/a8
AEUNITED ARAB EMIRATESn/a3 and 9
AFAFGHANISTANn/a4
AGANTIGUA AND BARBUDAn/a8
AIANGUILLAn/a8
ALALBANIAn/a8
AMARMENIAn/a5
AOANGOLAn/a8
ARARGENTINAn/a7
ASAMERICAN SAMOAn/a9
ATAUSTRIAyes5
AUAUSTRALIAn/a6
AWARUBAn/a9
AZAZERBAIJANn/a6 and 12
BABOSNIA AND HERZEGOVINAyes6
BDBANGLADESHn/a9
BEBELGIUMyes3
BFBURKINA FASOn/a5
BGBULGARIAn/a8
BHBAHRAINn/a4
BJBENINn/a5
BMBERMUDAn/a2
BNBRUNEI DARUSSALAMn/a6
BOBOLIVIAn/a5
BRBRAZILn/a7 and 8
BSBAHAMASn/a8
BTBHUTANn/a9
BWBOTSWANAn/a6
BYBELARUSn/a8 and 11
BZBELIZEn/a8
CACANADAn/a9
CFCENTRAL AFRICAN REPUBLICn/a10
CGCONGOn/a10
CHSWITZERLANDyes5
CICOTE D'IVOIREn/a5
CKCOOK ISLANDSn/a6
CLCHILEn/a3
CMCAMEROONn/a10
CNCHINAn/a12
COCOLOMBIAn/a2 and 5
CRCOSTA RICAyes3
CVCABO VERDEn/a2 and 8
CYCYPRUSn/a8
CZCZECHIAyes4
DEGERMANYyes8
DKDENMARKyes4
DMDOMINICAn/a8
DODOMINICAN REPUBLICn/a4
DZALGERIAn/a3
ECECUADORn/a2 and 8
EEESTONIAyes2
ESSPAINyes9
FIFINLANDyes3
FJFIJIn/a6
FOFAROE ISLANDSyes4
FRFRANCEyes10
GAGABONn/a10
GBUNITED KINGDOMyes6
GDGRENADAn/a8
GEGEORGIAn/a2 and 9
GFFRENCH GUIANAyes10
GGGUERNSEYyes6
GHGHANAn/a6
GIGIBRALTARn/a6
GLGREENLANDyes4
GMGAMBIAn/a6
GNGUINEAn/a6
GPGUADELOUPEyes10
GQEQUATORIAL GUINEAn/a10
GRGREECEn/a7
GTGUATEMALAn/a2
GUGUAMn/a9
GWGUINEA-BISSAUn/a5
GYGUYANAn/a8
HKHONG KONGn/a6
HNHONDURASn/a6
HRCROATIAyes7
HTHAITIn/a9
HUHUNGARYyes8
IDINDONESIAn/a7
IEIRELANDyes6
ILISRAELyes6
IMISLE OF MANyes6
ININDIAn/a9 and 11
ISICELANDyes4
ITITALYyes10
JEJERSEYyes6
JMJAMAICAn/a8
JOJORDANn/a2
JPJAPANn/a7
KEKENYAn/a5
KGKYRGYZSTANn/a6
KHCAMBODIAn/a6
KMCOMOROSn/a5
KNSAINT KITTS AND NEVISn/a8
KRREPUBLIC OF KOREAn/a7
KWKUWAITn/a4
KZKAZAKHSTANn/a3
LBLEBANONn/a4
LCSAINT LUCIAn/a8
LILIECHTENSTEINyes5
LKSRI LANKAn/a7
LSLESOTHOn/a6
LTLITHUANIAn/a5
LULUXEMBOURGn/a3
LVLATVIAn/a4
MAMOROCCOyes10
MCMONACOyes10
MDMOLDOVAn/a11
MEMONTENEGROyes3
MGMADAGASCARn/a10
MKNORTH MACEDONIAyes3
MLMALIn/a5
MNMONGOLIAn/a6
MOMACAOn/a3
MPNORTHERN MARIANA ISLANDSn/a9
MQMARTINIQUEyes10
MRMAURITANIAyes10
MSMONTSERRATn/a8
MTMALTAn/a5
MUMAURITIUSn/a4
MWMALAWIn/a6
MXMEXICOn/a6
MYMALAYSIAn/a4 and 9
MZMOZAMBIQUEn/a2
NANAMIBIAn/a6
NCNEW CALEDONIAyes10
NENIGERn/a5
NGNIGERIAn/a9
NINICARAGUAn/a2
NLNETHERLANDSyes4
NONORWAYyes4
NPNEPALn/a8
NZNEW ZEALANDn/a6
PAPANAMAn/a3 and 9
PEPERUn/a3
PFFRENCH POLYNESIAyes10
PGPAPUA NEW GUINEAn/a6
PHPHILIPPINESn/a6 and 9
PKPAKISTANn/a7
PLPOLANDyes8
PMSAINT PIERRE AND MIQUELONyes10
PRPUERTO RICOn/a9
PSPALESTINEn/a2 and 5
PTPORTUGALyes8
PYPARAGUAYn/a4 and 7
QAQATARn/a2
REREUNIONyes10
ROROMANIAn/a4
RSSERBIAyes3
RURUSSIAN FEDERATIONyes9
RWRWANDAn/a3
SASAUDI ARABIAn/a2
SBSOLOMON ISLANDSn/a6
SCSEYCHELLESn/a6
SESWEDENyes4
SGSINGAPOREn/a7
SISLOVENIAyes5
SKSLOVAKIAyes4
SLSIERRA LEONEn/a6
SMSAN MARINOyes10
SNSENEGALn/a5
STSAO TOME AND PRINCIPEn/a8
SVEL SALVADORn/a2
SZESWATINIn/a6
TDCHADn/a10
TGTOGOn/a5
THTHAILANDn/a7
TJTAJIKISTANn/a9
TLTIMOR-LESTEyes4
TNTUNISIAyes5
TOTONGAn/a6
TRTURKEYn/a9
TWTAIWANn/a7
TZTANZANIAn/a6
UAUKRAINEn/a6
UGUGANDAn/a6
USUNITED STATES OF AMERICAn/a9
UYURUGUAYn/a3
UZUZBEKISTANn/a5
VAHOLY SEEn/a3
VCSAINT VINCENT AND THE GRENADINESn/a8
VEVENEZUELA (BOLIVARIAN REPUBLIC OF)n/a4
VIVIRGIN ISLANDS (U.S.)n/a9
VNVIET NAMn/a8
VUVANUATUn/a6
WFWALLIS AND FUTUNAyes10
WSSAMOAn/a6
XKREPUBLIC OF KOSOVOyes4
YTMAYOTTEyes10
ZASOUTH AFRICAn/a6
ZMZAMBIAn/a6
ZWZIMBABWEn/a5
Web Tools
  • IBAN Checker
  • IBAN Calculator
  • Search BIC
  • VAT Checker
  • Currency Convert
  • Currency Exchange rates
Products
  • IBAN Suite: Validation & Calculation
  • Bank Suite: Global Banking Validation
  • BIC Validation Service
  • SortWare: Web Portal & Rest API
  • Forex Reference Suite
Developers
  • IBAN Validation API
  • IBAN Calculation API
  • Bank Suite API
  • BIC Validation API
  • SortWare Rest API
About
  • Why IBAN
  • Security
  • Customers
  • Our Data
  • News & Updates
Partners
BIC data used with permission of S.W.I.F.T. SCRL. Database Rights Reserved, 2023.
IBAN.com is an authorized VocaLink™ Distributor
S.W.I.F.T. SCRL  
Deutsche Bundesbank  
La Banque de France Eurosisteme
Vocalink LTD (Mastercard)  
Copyright © 2023 IBAN.COM
Privacy Terms DPA SLA Security Contact Sitemap