S2S Get Eligible BINs API

API Command: s2sEligibleBins

The S2S Eligible BINs API (s2sEligibleBins) API is similar to the Get BIN Info API, but used in S2S environment. For more information on Get BIN Info API, refer to Get Bin Info API.

Environment

EnvironmentURL
Production Environmenthttps://info.payu.in/merchant/postservice?form=2

Request parameters

Parameter

Reference

key mandatory

For more information on how to generate the Key and Salt, refer to any of the following: - Production: Generate Merchant Key and Salt - Test: Generate Test Merchant Key and Salt

var1 mandatory

Specify the value as "2" for S2S flow.

var2 mandatory

Specify any of the following values in this field based on the output you required: - 0 - Specify this value to fetch all the active and inactive bins. 1 - Specify this value to fetch the active bins only.

var3 mandatory

Specify the bank Name to be passed to get Bins of specific Bank.

var4 mandatory

Specify the categories of the card need to be passed. For example, creditcard.

var5 mandatory

Specify the card schemes should be passed in this field. For example; VISA, MAST.

hash mandatory

The hash logic that must be used by merchants to calculate the hash: Hash logic for this API is: sha512(key|command|var1|salt) sha512

Sample request

curl --location 'https://info.payu.in/merchant/postservice.php?form=2' \
--form 'key="smsplus"' \
--form 'command="s2sEligibleBins"' \
--form 'var1="2"' \
--form 'var2="1"' \
--form 'var3="KOTAK"' \
--form 'var4="debitcard"' \
--form 'var5="RUPAY"' \
--form 'hash="aksduhfksdjhjkdskkfdsjkdfkjshfkjhadsjkfsdfsdf"'

Sample response

{
   "data":[
      {
         "issuingBank":"HDFC",
         "schemes":[
            {
               "scheme":"MAST",
               "categories":[
                  {
                     "bins":[
                        "515470517",
                        "51166608",
                        "515470541"
                     ],
                     "category":"creditcard"
                  },
                  {
                     "bins":[
                        "535375995",
                        "535376757",
                        "54191904"
                     ],
                     "category":"debitcard"
                  }
               ]
            },
            {
               "scheme":"VISA",
               "categories":[
                  {
                     "bins":[
                        "478971945",
                        "432001408",
                        "434415570"
                     ],
                     "category":"debitcard"
                  }
               ]
            },
            {
               "scheme":"RUPAY",
               "categories":[
                  {
                     "bins":[
                        "652166040",
                        "607311",
                        "65254243"
                     ],
                     "category":"debitcard"
                  }
               ]
            }
         ]
      }
   ],
   "statusCode":200
}