Check is Domestic API

API Command: check_isDomestic

The Check is Domestic or Card BIN API is used to detect whether a particular BIN number is international or domestic. It is also useful to determine: 

  • card’s issuing bank
  • card type such as, Visa, Master, etc.,
  • card category such as Credit/Debit, etc. 
  • var1 is bin number which is the first 6 digits of a Credit/Debit card.

Environment

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=check_isDomestic&var1=462273&hash=df4ff56008defd9d7f9bf09506061f5c790dbe1d011659d85b88d34323ff49a65181e522eddf3075285c17708566709c803d3b0b0979120804b00f62236062a2"
Sample 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"
}
Response parameters description
ParameterDescription
isDomesticResponse value can contain any of the following:

- Y signifies that the particular BIN is domestic.
- N signifies that the particular BIN is International.
cardTypeResponse value can contain any of the following:

- MAST
- VISA
- MAES
- AMEX
- DINER
- Unknown
issuingBankThe issuing bank of the card used for the transaction.
cardCategoryResponse value can contain any of the following:

- CC signifies that the particular bin is a credit card BIN

- DC signifies that the particular bin is a debit card BIN

To learn more about the possible error codes and their description, refer to Error Codes.

Request parameters

Reference information
ParameterReference
keyFor 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
hashHash logic for this API is:
sha512(key|command|var1|salt)
sha512
var1For JSON fields description, refer to Additional Info for General APIs

Use the following sample values while trying out the API:

Example values

  • var1 (first six digit of the card): 512345.
Language
Click Try It! to start a request and see the response here!