The Get Issuing Bank Status API (getIssuingBankStatus) is used to help you handle the credit card or debit card issuing bank downtime.
Environment
Request header
| Parameter | Description |
|---|---|
| date | The current date and time. For example, format of the date is Wed, 28 Jun 2023 11:25:19 GMT. |
| authorization | The actual HMAC signature generated using the specified algorithm (sha512) and includes the hashed data. For more information, refer to authorization fields description. |
authorization fields description
| Field | Description |
|---|---|
| username | Represents the username or identifier for the client or merchant, for example smsplus. |
| algorithm | Use SHA512 algorithm for hashing and send this as header value. |
| headers | Specifies which headers have been used in generating the hash, for example date. |
| signature | The HMAC signature generated using the specified algorithm. For more information, refer to hashing algorithm. |
hashing algorithm
You must hash the request parameters using the following hash logic:
Hash logic: sha512(`<Body data>` + '|' + date + '|' + merchant_secret)
Where <Body data> contains the request body posted with the request.
Sample header code
var merchant_key = '<YOUR_TEST_KEY>';
var merchant_secret = 'YOUR_TEST_SALT';
// date
var date = new Date();
date = date.toUTCString();
// authorization
var authorization = getAuthHeader(date);
function getAuthHeader(date) {
var AUTH_TYPE = 'sha512';
var data = isEmpty(request['data']) ? "" : request['data'];
var hash_string = data + '|' + date + '|' + merchant_secret;
var hash = CryptoJS.SHA512(hash_string).toString(CryptoJS.enc.Hex);
return `hmac username="${merchant_key}", algorithm="${AUTH_TYPE}", headers="date", signature="${hash}"`;
}Query parameters
Mandatory parameters
| Parameter | Description | Example |
|---|---|---|
bin | String The first 6 digits of the card number (Bank Identification Number) to get issuing bank status. | 512345 |
Optional parameters
| Parameter | Description | Example |
|---|---|---|
issuing_bank_status | Boolean Flag to include issuing bank status information in the response. | true |
Request body
Mandatory parameters
| Parameter | Description | Example |
|---|---|---|
bin | String The first six digits of card (card BIN) must be specified here. | 512345 |
Sample request
curl --location 'https://info.payu.in/issuing-bank/v1/bin/?bin=512345&issuing_bank_status=true' \
--header 'Content-Type: application/json' \
--header 'date: {{date}}' \
--header 'Authorization: {{authorization}}' \
--data '{
"bin": "512345"
}'
The --data flag implies a POST request. Note that bin appears in both the query string and the request body — this is preserved exactly as in the original cURL. The {{date}} and {{authorization}} placeholders follow a template/collection variable style (e.g., Postman) and are kept as-is for you to substitute.
import requests
import json
url = "https://info.payu.in/issuing-bank/v1/bin/"
params = {
"bin": "512345",
"issuing_bank_status": "true"
}
headers = {
"Content-Type": "application/json",
"date": "{{date}}",
"Authorization": "{{authorization}}"
}
payload = {
"bin": "512345"
}
response = requests.post(url, headers=headers, params=params, data=json.dumps(payload))
print("Status Code:", response.status_code)
print("Response:", response.text)using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("date", "{{date}}");
client.DefaultRequestHeaders.Add("Authorization", "{{authorization}}");
string requestUrl = "https://info.payu.in/issuing-bank/v1/bin/?bin=512345&issuing_bank_status=true";
string jsonBody = "{\"bin\":\"512345\"}";
StringContent content = new StringContent(jsonBody, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(requestUrl, content);
Console.WriteLine("Status Code: " + (int)response.StatusCode);
Console.WriteLine("Response: " + await response.Content.ReadAsStringAsync());
}
}const url = "https://info.payu.in/issuing-bank/v1/bin/?bin=512345&issuing_bank_status=true";
const headers = {
"Content-Type": "application/json",
"date": "{{date}}",
"Authorization": "{{authorization}}"
};
const body = JSON.stringify({
bin: "512345"
});
const response = await fetch(url, {
method: "POST",
headers: headers,
body: body
});
console.log("Status Code:", response.status);
console.log("Response:", await response.text());import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) throws Exception {
URL url = new URL("https://info.payu.in/issuing-bank/v1/bin/?bin=512345&issuing_bank_status=true");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setDoOutput(true);
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("date", "{{date}}");
conn.setRequestProperty("Authorization", "{{authorization}}");
String jsonBody = "{\"bin\":\"512345\"}";
try (OutputStream os = conn.getOutputStream()) {
os.write(jsonBody.getBytes("UTF-8"));
}
int statusCode = conn.getResponseCode();
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
StringBuilder response = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
response.append(line);
}
br.close();
System.out.println("Status Code: " + statusCode);
System.out.println("Response: " + response.toString());
}
}<?php
$url = "https://info.payu.in/issuing-bank/v1/bin/?bin=512345&issuing_bank_status=true";
$headers = [
"Content-Type: application/json",
"date: {{date}}",
"Authorization: {{authorization}}"
];
$body = json_encode([
"bin" => "512345"
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status Code: " . $statusCode . "\n";
echo "Response: " . $response . "\n";Response parameters
The response parameters for a bank code passed in var1, it returns a response for the specified bank alone with the parameters as explained in the following table. If the default value is passed in var1, it returns a array of all the banks in a JSON array format and each JSON has the list of fields similar to the parameter list:
| Parameter | Description | Example |
|---|---|---|
| message | String Response message indicating the status of the API call. |
Success |
| status | Integer Overall status code of the API response. |
1 |
| result | Object Contains detailed information about the BIN and issuing bank details. For more information, refer to result object fields description |
Refer to result object fields description |
result object fields description
Sample object
{
"status": 0,
"category": "creditcard",
"bin": "512345",
"is_domestic": false,
"card_type": "MAST",
"issuing_bank": "UNKNOWN",
"otp_on_fly": false,
"issuing_bank_status": 1,
"is_atmpin_card": 1,
"oobEligible": false
}
Fields description
| Field | Description | Example |
|---|---|---|
| status | Integer Status code specific to the BIN lookup result. |
0 |
| category | String Category of the card (e.g., creditcard, debitcard). |
creditcard |
| bin | String The Bank Identification Number (first 6 digits of the card). |
512345 |
| is_domestic | Boolean Indicates whether the card is domestic (true) or international (false). |
false |
| card_type | String Type of card network (MAST, VISA, AMEX, etc.). |
MAST |
| issuing_bank | String Name of the issuing bank or "UNKNOWN" if not identified. |
UNKNOWN |
| otp_on_fly | Boolean Indicates if the card supports OTP on the fly authentication. |
false |
| issuing_bank_status | Integer Status code for the issuing bank information. |
1 |
| is_atmpin_card | Integer Indicates if the card supports ATM PIN authentication (1 = yes, 0 = no). |
1 |
| oobEligible | Boolean Indicates if the card is eligible for out-of-band authentication. |
false |
Sample response
{
"message": "Success",
"status": 1,
"result": {
"status": 0,
"category": "creditcard",
"bin": "512345",
"is_domestic": false,
"card_type": "MAST",
"issuing_bank": "UNKNOWN",
"otp_on_fly": false,
"issuing_bank_status": 1,
"is_atmpin_card": 1,
"oobEligible": false
}
Next Steps
- Proactive Downtime Warnings:
- If
issuing_bank_statusis0(DOWN), display a warning banner on your checkout form alerting the shopper that their issuing bank is facing degradation.
- If
- Suggest Alternative Payment Methods:
- Recommend using UPI, Net Banking, or a different card to prevent transaction drop-offs and improve checkout conversion rates.
- Proceed with Payment:
- If the bank is active (
1), seamlessly proceed with the Cards v2 Payment API.
}
- If the bank is active (
