Using Razorpay's IFSC Public API

Razorpay's IFSC Public API allows developers to retrieve financial institution data by using the institution's IFSC (Indian Financial System Code) code. In this post, we will go over how to use this API in JavaScript.

Getting started

First, you need to obtain an API key from Razorpay's developer dashboard. Once you have a key, you can start using the API endpoints.

To retrieve information about a financial institution using Razorpay's IFSC Public API, make a GET request to the following endpoint, where {IFSC} is the IFSC code for the institution:

https://ifsc.razorpay.com/{IFSC}

Example code

Here's an example of how to use the API in JavaScript using the fetch method:

// Replace {IFSC} with the desired IFSC code
const ifscCode = "ICIC0000001";

fetch(`https://ifsc.razorpay.com/${ifscCode}`)
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((err) => console.error(err));

This code will log the institution's data to the console in JSON format.

Data returned

When you make a GET request to the API, the data returned includes the following:

  • bank: Name of the financial institution
  • ifsc: IFSC code for the institution
  • branch: The branch location of the institution
  • address: Address of the institution's branch
  • contact: Contact information for the institution's branch
  • city: The city where the branch is located
  • district: The district where the branch is located
  • state: The state where the branch is located

Conclusion

Razorpay's IFSC Public API is a useful tool for developers who need to retrieve financial institution data quickly and easily. By following the steps outlined in this post, you can easily integrate this API into your JavaScript code.

Related APIs