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 = 'smsplus';
var merchant_secret = 'izF09TlpX4ZOwmf9MvXijwYsBPUmxYHD';
// 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
Parameter | Description | Example |
---|---|---|
binmandatory |
String The first 6 digits of the card number (Bank Identification Number) to get issuing bank status. |
512345 |
issuing_bank_statusoptional |
Boolean Flag to include issuing bank status information in the response. |
true |
Request body
Parameter | Description | Example |
---|---|---|
binmandatory |
String The first six digits ofcard (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"
}'
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
}
}