Get Issuing Bank Down BINs API

The Getting Issuing Bank Down Bins API (gettingIssuingBankDownBins) is used to retrieve the card BINs for all the banks that are observing either full downtime or partial downtime at an instance.


Sample request
curl -X POST "https://test.payu.in/merchant/postservice?form=2" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=JP***g&command=getIssuingBankDownBins&var1=ALLBD&var2=1&hash=efc4452469091d4d6061fcf6bce45c8116675972a89ddcba6bdd27dce613ca6e48e703e3ba7f6015ef128eda60ed61a3307795c5dd7e284a7691f0c6dc3812a8"
import requests

url = "https://test.payu.in/merchant/postservice?form=2"

headers = {
    "accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
}

data = {
    "key": "JP***g",
    "command": "getIssuingBankDownBins",
    "var1": "ALLBD",
    "var2": "1",
    "hash": "efc4452469091d4d6061fcf6bce45c8116675972a89ddcba6bdd27dce613ca6e48e703e3ba7f6015ef128eda60ed61a3307795c5dd7e284a7691f0c6dc3812a8"
}

try:
    response = requests.post(url, headers=headers, data=data)
    print(f"Status Code: {response.status_code}")
    print(f"Response: {response.text}")
except requests.exceptions.RequestException as e:
    print(f"Error: {e}")
async function makeRequest() {
    const url = "https://test.payu.in/merchant/postservice?form=2";
    
    const headers = {
        "accept": "application/json",
        "Content-Type": "application/x-www-form-urlencoded"
    };

    const formData = new URLSearchParams({
        "key": "JP***g",
        "command": "getIssuingBankDownBins",
        "var1": "ALLBD",
        "var2": "1",
        "hash": "efc4452469091d4d6061fcf6bce45c8116675972a89ddcba6bdd27dce613ca6e48e703e3ba7f6015ef128eda60ed61a3307795c5dd7e284a7691f0c6dc3812a8"
    });

    try {
        const response = await fetch(url, {
            method: "POST",
            headers: headers,
            body: formData
        });
        
        const responseText = await response.text();
        console.log(`Status Code: ${response.status}`);
        console.log(`Response: ${responseText}`);
    } catch (error) {
        console.error(`Error: ${error.message}`);
    }
}

makeRequest();
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;

public class ApiRequest {
    public static void main(String[] args) {
        try {
            String url = "https://test.payu.in/merchant/postservice?form=2";
            
            String formData = "key=JP***g&command=getIssuingBankDownBins&var1=ALLBD&var2=1&hash=efc4452469091d4d6061fcf6bce45c8116675972a89ddcba6bdd27dce613ca6e48e703e3ba7f6015ef128eda60ed61a3307795c5dd7e284a7691f0c6dc3812a8";
            
            HttpClient client = HttpClient.newBuilder()
                .connectTimeout(Duration.ofSeconds(10))
                .build();

            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .header("accept", "application/json")
                .header("Content-Type", "application/x-www-form-urlencoded")
                .POST(HttpRequest.BodyPublishers.ofString(formData))
                .build();

            HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
            
            System.out.println("Status Code: " + response.statusCode());
            System.out.println("Response: " + response.body());
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    private static readonly HttpClient client = new HttpClient();

    static async Task Main(string[] args)
    {
        try
        {
            string url = "https://test.payu.in/merchant/postservice?form=2";
            
            client.DefaultRequestHeaders.Add("accept", "application/json");

            var formData = new List<KeyValuePair<string, string>>
            {
                new KeyValuePair<string, string>("key", "JP***g"),
                new KeyValuePair<string, string>("command", "getIssuingBankDownBins"),
                new KeyValuePair<string, string>("var1", "ALLBD"),
                new KeyValuePair<string, string>("var2", "1"),
                new KeyValuePair<string, string>("hash", "efc4452469091d4d6061fcf6bce45c8116675972a89ddcba6bdd27dce613ca6e48e703e3ba7f6015ef128eda60ed61a3307795c5dd7e284a7691f0c6dc3812a8")
            };

            var formContent = new FormUrlEncodedContent(formData);
            HttpResponseMessage response = await client.PostAsync(url, formContent);
            string responseBody = await response.Content.ReadAsStringAsync();
            
            Console.WriteLine($"Status Code: {response.StatusCode}");
            Console.WriteLine($"Response: {responseBody}");
        }
        catch (HttpRequestException ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}
<?php
$url = "https://test.payu.in/merchant/postservice?form=2";

$headers = [
    "accept: application/json",
    "Content-Type: application/x-www-form-urlencoded"
];

$postData = [
    "key" => "JP***g",
    "command" => "getIssuingBankDownBins",
    "var1" => "ALLBD",
    "var2" => "1",
    "hash" => "efc4452469091d4d6061fcf6bce45c8116675972a89ddcba6bdd27dce613ca6e48e703e3ba7f6015ef128eda60ed61a3307795c5dd7e284a7691f0c6dc3812a8"
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if (curl_errno($ch)) {
    echo "Error: " . curl_error($ch) . "\n";
} else {
    echo "Status Code: " . $httpCode . "\n";
    echo "Response: " . $response . "\n";
}

curl_close($ch);
?>
Sample response
[
      {
            "issuing_bank": "ALLBD",
            "status": 2,
            "title": "ALLAHABAD BANK",
            "bins_arr": [
                  "421337",
                  "608219",
                  "608218",
                  "608171",
                  "608102",
                  "607352",
                  "607137",
                  "607038",
                  "607091",
                  "607016",
                  "607117",
                  "430450",
                  "652204"
            ]
      }
]
Response parameters

The API returns a JSON array. Each object describes one issuing bank and the BINs that are down (full or partial downtime per your var2 filter). If var1 is default, you get entries for all applicable banks; if var1 is a specific bank code, the response is scoped to that bank.

Parameter/JSON fieldDescriptionExample
issuing_bankIssuing bank code for this entry.ALLBD
statusStatus code for this bank’s downtime entry (as returned by PayU).2
titleDisplay name of the issuing bank.ALLAHABAD BANK
bins_arrList of card BINs under this bank that are in downtime (full or partial, per var2).["421337", "608219", …]

Request parameters

Use the following sample values while trying out the API:

Reference information for request parameters

Parameter

Reference

key

For more information on how to generate the Key and Salt, refer to any of the following:

command

Must be getIssuingBankDownBins.

var1

Bank name code (as provided by PayU) or default for all banks.

var2

0 — BINs that are fully down; 1 — BINs that are partially down.

hash

Hash logic for this API is:

sha512(key|command|var1|salt) sha512

Example values:

  • var1: Pass default for downtime across all banks, or a specific bank code (e.g. ALLBD) for one bank.
  • var2: 0 for fully down BINs, 1 for partially down BINs (see sample request).
Query Params
const
enum
required
Allowed:
Form Data
string
required
Defaults to JPM7Fg

The merchant key is a unique identifier for a merchant account that is provided by PayU.

const
enum
required

This parameter must have getIssuingBankDownBins as command name.

Allowed:
string
required

This parameter must contain the bank name code (to be provided by PayU) or “default”.

integer
required

This parameter must contain either "0" (zero) to extract information about fully down BIN or "1" to extract information about partially down BIN.

string
required

It is used to avoid the possibility of transaction tampering. Hash formula: sha512(key|command|var1|salt)

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain