1. Home
  2. Docs
  3. Developers Guide
  4. Integration APIs
  5. Bin Check API

Bin Check API

This API is used to detect whether a particular bin number is international or domestic. It is also useful to determine the card’s issuing bank, the card type brand – i.e, Visa, Master etc, and also the Card Category – i.e. Credit/Debit, etc. var1 is bin number which is the first 6 digits of a Credit/Debit card.

API endpoint: POST  https://test.payu.in/merchant/postservice?form=2

Request Parameters

ParameterDescriptionValue
keyMerchant key provided by PayU. Please refer to the first entry in the Post Parameters table for a detailed description of this parameter JPTXg
command This parameter must have the name of the web-service. check_isDomestic
var1 Card Number/Bin
(First 6 digits of a card)
512345
hashThis parameter must contain the hash value to be calculated at your end. The string used for calculating the hash is mentioned below:
sha512(key|command|var1|salt)
sha512 is the encryption method used here
2a04a44ed058ca724a
17b4e4d4639aa15254a
343e0

Request body

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=check_isDomestic&var1=462273&hash=df4ff56008defd9d7f9bf09506061f5c790dbe1d011659d85b88d34323ff49a65181e522eddf3075285c17708566709c803d3b0b0979120804b00f62236062a2"

Response

  • If the card is domestic
{
      "isDomestic": "Y",
      "issuingBank": "SCB",
      "cardType": "VISA",
      "cardCategory": "CC"
}
  • If the card is international
{
      "isDomestic": "N",
      "issuingBank": "UNKNOWN",
      "cardType": "Unknown",
      "cardCategory": "CC"
}

Here in the output,

  • isDomestic = Y signifies that the particular bin is domestic.
  • isDomestic = N signifies that the particular bin is International.
  • cardType = <value> which can be [‘MAST’,’VISA’,’MAES’,’AMEX’, ‘DINR’,’Unknown’]
  • [issuingBank] = The issuing bank of the card used for transaction
  • [cardCategory] = CC signifies that the particular bin is a Credit Card Bin
  • [cardCategory] = DC signifies that the particular bin is a Debit Card Bin

Note: This API would give the output based upon PayU’s bin list which may not be completely exhaustive.