IFSC Code Validation

IFSC (Indian Financial System Code) code is an eleven-character code used to identify the individual branch of an Indian bank or financial institution. It’s much like a SWIFT code but for an Indian bank account.

An IFSC code consists of 11 characters and contains the bank code (first 4 alphabetic characters) and the branch code (last 6 characters, usually numeric, but can be alphabetic). The fifth character is 0 (zero) and reserved for future use

For example, IFSC code ABHY0065022:

When you send money using an invalid IFSC code, the bank should reverse the transaction and return the money, but this might take some time and your bank may charge you a fee. Using our flexible and fast RESTful API you can validate an IFSC code and receive all possible information about it - see whether it's valid and which bank, state and branch it belongs to, as well as branch city, address and postcode.

How to validate an IFSC code

To start using our SWIFT codes API sign up here and create your API key. Pass this key either via x-api-key HTTP header or via api_key query param.

To validate an IFSC code call /v1/ifscs/{ifsc_code} endpoint using HTTP client of your preference, i.e.:

curl 'https://swiftcodesapi.com/v1/ifscs/ABHY0065022' \
    --header 'X-Api-Key: your-api-key-here' \
    --header 'Accept: application/json'
# INSTALLATION
$ composer require guzzlehttp/guzzle
# REQUEST
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://swiftcodesapi.com/v1/ifscs/ABHY0065022', [
    'headers' => [
        'Accept' => 'application/json',
        'X-Api-Key' => 'your-api-key-here',
    ],
]);

echo $response->getBody();
# INSTALLATION
$ python -m pip install requests
# REQUEST
import requests

url = "https://swiftcodesapi.com/v1/ifscs/ABHY0065022"

headers = {
    "Accept": "application/json",
    "X-Api-Key": "your-api-key-here"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
# INSTALLATION
$ npm install node-fetch --save
// REQUEST
const fetch = require('node-fetch');

const url = 'https://swiftcodesapi.com/v1/ifscs/ABHY0065022';
const options = {method: 'GET', headers: {'Accept': 'application/json', 'X-Api-Key': 'your-api-key-here'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));)
const options = {method: 'GET', headers: {'Accept': 'application/json', 'X-Api-Key': 'your-api-key-here'}};

fetch('https://swiftcodesapi.com/v1/ifscs/ABHY0065022', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

The response should be:

{
    "success": true,
    "data": {
        "id": "ABHY0065022",
        "branch_name": "CBD BELAPUR",
        "branch_code": "065022",
        "address": "SECTOR-3, CHANAKYA SHOPPING CENTRE, BELAPUR (CBD), NAVI MUMBAI-400614",
        "district": "GREATER MUMBAI",
        "city": "MUMBAI",
        "state": "MAHARASHTRA",
        "std": "22",
        "phone": "27572179",
        "bank": {
            "id": "1bc55546-de33-478a-a9d7-745d0b2567eb",
            "country_id": "IN",
            "code": "ABHY",
            "name": "ABHYUDAYA COOPERATIVE BANK LIMITED"
        }
    }
}

You can find full documentation here.