Retrieve Card Info

Definition

https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver


This request enables you to verify the following details for a specific card number:

  • Card type, such as Visa or Mastercard
  • Card sub-type, such as credit or debit
  • Card category, such as prepaid
  • Bin category, such as commercial or consumer
  • Card regulation, if eligible for US regulated debit pricing
  • Issuing bank, the name of the bank that issued the card
  • Issuing country code, such as US

JSON

JSON Request Content

Send a creditCard object, with one of the following:

  • cardNumber - the first 6 or 8 digits that represent the BIN    optional
  • encryptedCardNumber string    optional

JSON Response Details

If successful, the response HTTP status code is 200 OK.
The response includes the creditCard object, with the following properties:

PropertyType
cardTypestring
cardSubTypestring
cardCategorystring
binCategorystring
cardRegulatedstring
issuingBankstring
issuingCountryCodestring

If the request fails, the API returns an HTTP 400 response, with one of these messages in the body:

{
  "message": [
  {
    "errorName": "UNABLE_TO_RESOLVE_CARD_INFO",
    "code": 22010,
    "description": "Unable to resolve credit card info."
  }
 ]
}
{
  "message": [
  {
    "errorName": "BIN_IS_NOT_VALID",
    "code": 22011,
    "description": "card number needs to be at least 6 digits long."
  }
 ]
}
{
  "message": [
  {
    "errorName": "MISSING_CARD_NUMBER",
    "code": 22012,
    "description": "Card number is missing."
  }
 ]
}
{
  "message": [
  {
    "errorName": "CARD_TYPE_NOT_SUPPORTED",
    "code": 22013,
    "description": "Card type is not supported."
  }
 ]
}
{
  "message": [
  {
    "errorName": "CARD_NUMBER_NOT_VALID",
    "code": 22014,
    "description": "Card number is not valid."
  }
 ]
}

JSON Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"cardNumber": 422211}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"encryptedCardNumber": "$bsjs_0_0_1$cQfgKpL9FX462iFqeIpYbhL8xLIEYLeJuMRBQZw0UKUJGiuoXFeMoGqsgBlv0AM1olaSYk33bW4jNg69/mf/J/trRd0WsjU0+fkywvQAZqdt6RoMFW1YTT6bii02qy0TgLTPYHFEXL1Ei6sfft/QO6T9htKD4AAnS8E542Dc6bb90+qOZR2dmN3STCaefTudsO4mjUvX82lm0UzuO753OPNm1ICEB39zpwcL+oOd3mCRdnc9f9/Wt4AbLHGJY/ZD4RMnCBo1/ogRcTP19gquewauNnMAAeJ0h04kbDMXZGrDeAchFbLLyw+O7Nc96UN+PeoKrJWOGy/3urcWyhvaUA==$qQqzt+wBV+Ri4nEb0DUg5SRMmJDDN7A/7j4YK2GFzt2FP3N1ChG1dzTOLHd81dSd$pfpz7i+R2kLtJJIZUkhX1ARYEf4vakIF8qmYE777jas="}'

Response Example

{
    "cardType": "VISA",
    "cardSubType": "CREDIT",
    "cardCategory": "BUSINESS",
    "binCategory": "COMMERCIAL",
    "cardRegulated": "N",
    "issuingBank": "BANCO BRADESCARD S.A.",
    "issuingCountryCode": "BR"
}

XML

XML Request Content

credit-card container    required, contains one of the following properties:

  • card-number string - first 6 digits only    optional
  • encrypted-card-number string    optional

XML Response Details

If successful, the response HTTP status code is 200 OK.
The response body includes the following:
credit-card container     with the following properties:

PropertyType
card-typestring
card-sub-typestring
card-categorystring
bin-categorystring
card-regulatedstring
issuing-bankstring
issuing-country-codestring

If the request fails, the API returns an HTTP 400 response, with one of these messages in the body:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages xmlns="http://ws.plimus.com">
    <message>
        <error-name>UNABLE_TO_RESOLVE_CARD_INFO</error-name>
        <code>22010</code>
        <description>Unable to resolve credit card info.</description>
    </message>
</messages>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages xmlns="http://ws.plimus.com">
    <message>
        <error-name>BIN_IS_NOT_VALID</error-name>
        <code>22011</code>
        <description>card number needs to be at least 6 digits long.</description>
    </message>
</messages>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages xmlns="http://ws.plimus.com">
    <message>
        <error-name>MISSING_CARD_NUMBER</error-name>
        <code>22012</code>
        <description>Card number is missing.</description>
    </message>
</messages>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages xmlns="http://ws.plimus.com">
    <message>
        <error-name>CARD_TYPE_NOT_SUPPORTED</error-name>
        <code>22013</code>
        <description>Card type is not supported.</description>
    </message>
</messages>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages xmlns="http://ws.plimus.com">
    <message>
        <error-name>CARD_NUMBER_NOT_VALID</error-name>
        <code>22014</code>
        <description>Card number is not valid.</description>
    </message>
</messages>

XML Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<credit-card xmlns="http://ws.plimus.com">
<card-number>422211</card-number>
</credit-card>
curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<credit-card  xmlns="http://ws.plimus.com">
    <encrypted-card-number>$bsjs_0_0_1$cQfgKpL9FX462iFqeIpYbhL8xLIEYLeJuMRBQZw0UKUJGiuoXFeMoGqsgBlv0AM1olaSYk33bW4jNg69/mf/J/trRd0WsjU0+fkywvQAZqdt6RoMFW1YTT6bii02qy0TgLTPYHFEXL1Ei6sfft/QO6T9htKD4AAnS8E542Dc6bb90+qOZR2dmN3STCaefTudsO4mjUvX82lm0UzuO753OPNm1ICEB39zpwcL+oOd3mCRdnc9f9/Wt4AbLHGJY/ZD4RMnCBo1/ogRcTP19gquewauNnMAAeJ0h04kbDMXZGrDeAchFbLLyw+O7Nc96UN+PeoKrJWOGy/3urcWyhvaUA==$qQqzt+wBV+Ri4nEb0DUg5SRMmJDDN7A/7j4YK2GFzt2FP3N1ChG1dzTOLHd81dSd$pfpz7i+R2kLtJJIZUkhX1ARYEf4vakIF8qmYE777jas=</encrypted-card-number>
</credit-card>'

Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<credit-card xmlns="http://ws.plimus.com">
    <card-type>VISA</card-type>
    <card-sub-type>CREDIT</card-sub-type>
    <card-category>BUSINESS</card-category>
    <bin-category>COMMERCIAL</bin-category>
    <card-regulated>N</card-regulated>
    <issuing-bank>BANCO BRADESCARD S.A.</issuing-bank>
    <issuing-country-code>BR</issuing-country-code>
</credit-card>