IFSC Finder is module based on Razorpay's API to get IFSC details. It provides simple way to get bank detailed for specific IFSC code.
var ifsc = require('ifsc-finder');
Use following command to install IFSC finder
npm install ifsc-finder
If you want to get details (Bank, City, State, etc) for specific IFSC_code
following function will be usefull.
ifsc.get(IFSC_code).then(function(res){
console.log(res);
})
Different functions are avaiable to get only specific details like Bank Name, Bank Code, City, State, etc. Below is example to get Bank Name for IFSC_Code
.
ifsc.getBankName(IFSC_code).then(function(res){
console.log(res);
})
getBankName(IFSC_Code)
- Returns Bank Name for specified IFSC codegetBranchName(IFSC_Code)
- Returns Branch Name for specified IFSC codegetBankCode(IFSC_Code)
- Returns Bank Code for specified IFSC codegetMicr(IFSC_Code)
- Returns bank's MICR Code for specified IFSC codegetDistrict(IFSC_Code)
- Returns District for specified IFSC codegetCity(IFSC_Code)
- Returns City for specified IFSC codegetState(IFSC_Code)
- Returns State for specified IFSC codegetContact(IFSC_Code)
- Returns Contact Number for specified IFSC codegetAddress(IFSC_Code)
- Returns bank's Address for specified IFSC codeisUpi(IFSC_Code)
- Returns true if bank supports UPI for specified IFSC codeisImps(IFSC_Code)
- Returns true if bank supports IMPS for specified IFSC codeisNeft(IFSC_Code)
- Returns true if bank supports NEFT for specified IFSC codeisRtgs(IFSC_Code)
- Returns true if bank supports RTGS for specified IFSC code
Get only required details like Bank, City, etc. in one function call. See below example:
var details_list = ['bank','state','Contact']
ifsc.get(IFSC_code, details_list).then(function(res){
console.log(res);
})
// Output:
{ BANK: 'Credit Suisse Bank', STATE: 'Maharastra', CONTACT: ' 022 6777 3417' }
Note : Passing invalid/unsupported detail Id (e.g 'state2') in details list
ifsc.get()
will be returned inSKIPPED
. See below sample output:
{ BANK: 'Credit Suisse Bank', STATE: 'Maharastra', CONTACT: ' 022 6777 3417' , SKIPPED: ['state2'] }
If you pass single detail instead of details array then ifsc.get()
will return plain string insead of object.
ifsc.get(IFSC_code, "bank").then(function(res){
console.log(res);
})
// Output:
Credt Suisse Bank
Currently available detail Ids - CENTRE, IMPS, UPI, ADDRESS, STATE, DISTRICT, RTGS, MICR, NEFT, BRANCH, CITY, CONTACT, MICR, MICR CODE, BANK, BANKCODE, IFSC.