---
title: Bank list
description: This API is to provide consolidated bank list and branch code on the basis of api_mode..
---

This API is to provide consolidated bank list and branch code on the basis of api_mode. If api mode is bank_details, it will fetch only bank list. If the api_mode is branch_details , we need to enter bank code also, it will list all branches of that particular bank

## POST

```
https://kraken.airpay.co.in/airpay/ms/baas/api/banks
```

## Header

| Field | Type | Description |
| --- | --- | --- |
| affiliate | Text | Will be provided by Airpay (required) |
| checksum | Text | $string = $param.self::$secret_key; sha256(<concate all values+SECRET KEY>); (required) |
| api-key | Text | Will be provided by airpay ( required) |
| processor-key | Text | Will be provided by airpay ( required) |

## Parameter

| Field | Type | Description |
| --- | --- | --- |
| api_mode | Text | bank_details / branch_details (length 10, required)<br>bank_details: it will fetch only bank details<br>branch_details: fetch only branch details for given bank_id |
| bank_code | Text | bank_code Required if the api mode is set to branch_details, the API will return all the branches of the bank for given bank id |
## Request-Example: api_mode=bank_details


```

curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/banks' \
--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'api_mode=bank_details'
```
## Request-Example: api_mode = branch_details
```

curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/banks' \
--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'bank_code=ICICI' \
--data-urlencode 'api_mode=branch_details'
```

## Success 200

| Field | Type | Description |
| --- | --- | --- |
| status | Numeric | 400- fail,200-success(length 3) |
| message | Text | success, fail |
| data | Text | Json response { "status": status code, "message": response message, "data":[ {"parameter":"array required data"}] } |
## Success-Response: api_mode = branch_details


```

    {
    "status": "200",
    "message":"success",
    "data": [
	          {
            "ifsc_id": 295888,
            "ifsc_code": "ABHY0012345",
            "bank_id": 12,
            "micr_code": "",
            "state_id": 62,
            "city_id": 2707,
            "bank_address": "ABHYUDAYA BANK BLDG., PALLIMUKK, KOCHI (E), KERALA-412345",
            "pin_code": 0,
            "branch_name": "KALLOR",
            "phone_number": "21234567",
            "branch_code": "065001",
            "added_on": "2022-03-29T05:04:07.000Z",
            "bank_name": "ABHYUDAYA COOPERATIVE BANK LIMITED",
            "bank_code": "ABHY"
        },... ]
    }
```
## Success-Response: api_mode = bank_details
```
{
    "status": "200",
    "message":"success",
    "data": [ {
            "bank_id": 1,
            "bank_name": "STATE BANK OF INDIA",
            "bank_code": "SBI",
            "added_on": "25-01-2021"
        },
        {
            "bank_id": 2,
            "bank_name": "ICICI BANK LIMITED",
            "bank_code": "ICICI",
            "added_on": "25-01-2021"
        },
        {
            "bank_id": 3,
            "bank_name": "IDFC First Bank Ltd",
            "bank_code": "IDFC",
            "added_on": "25-01-2021"
        },...]
   }
```
## Error-Response: api_mode = branch_details


```
{
    "status": "400",
    "message": "Failed",
    "data": ""
}
```
## Error-Response: api_mode = bank_details
```
{
    "status": "400",
    "message": "Failed",
    "data": ""
}
```