{"_id":"5b197473be7bb50003d5dbca","category":{"_id":"5b197473be7bb50003d5dba3","version":"5b197473be7bb50003d5dbd6","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-05-17T12:18:35.535Z","from_sync":false,"order":8,"slug":"retrieving-card-info","title":"Retrieve Card Info"},"parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","version":{"_id":"5b197473be7bb50003d5dbd6","project":"57336fd5a6a9c40e00e13a0b","__v":2,"forked_from":"5addf90f94fe9d0003cd9d29","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z","categories":["5b197473be7bb50003d5db9c","5b197473be7bb50003d5db9d","5b197473be7bb50003d5db9e","5b197473be7bb50003d5db9f","5b197473be7bb50003d5dba0","5b197473be7bb50003d5dba1","5b197473be7bb50003d5dba2","5b197473be7bb50003d5dba3","5b197473be7bb50003d5dba4","5b197473be7bb50003d5dba5","5b197473be7bb50003d5dba6","5b27bded4799c70003f36389","5b34c737e0dca2000311de6a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.26 Release","version_clean":"8976.0.0-Tools","version":"8976-Tools"},"githubsync":"","__v":1,"updates":["5b49b42e48ac4f0003210dd1"],"next":{"pages":[],"description":""},"createdAt":"2016-05-17T13:14:52.652Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"get","results":{"codes":[{"code":"","language":"text"}]},"settings":"","auth":"optional","params":[],"url":""},"isReference":true,"order":0,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver\n\n<hr>\n\n##Documentation\nThis request enables you to verify the following details for a specific card number:\n  * Card type, such as Visa or MasterCard\n  * Card sub-type, such as credit or debit\n  * Card category, such as prepaid\n  * Issuing country code, such as US\n[block:html]\n{\n  \"html\": \"<ul class=\\\"nav nav-pills nav-justified\\\">\\n  <li class=\\\"active\\\"><a data-toggle=\\\"pill\\\" href=\\\"#menujson\\\">JSON</a></li>\\n  <li><a data-toggle=\\\"tab\\\" href=\\\"#menuxml\\\">XML</a></li>\\n</ul>\\n<div class=\\\"tab-content\\\">\\n  <div id=\\\"menujson\\\" class=\\\"tab-pane fade in active\\\">\"\n}\n[/block]\n###JSON Request Content\n\nSend a **creditCard** object, with one of the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardNumber` &nbsp;&nbsp;&nbsp; *string*  - first 6 digits only &nbsp;&nbsp;&nbsp;optional\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`encryptedCardNumber` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n\n###JSON Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response includes the **creditCard** object, with the following properties:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardType` &nbsp;&nbsp;&nbsp; *string*\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardSubType` &nbsp;&nbsp;&nbsp; *string*\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardCategory` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp; if relevant\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`issuingCountryCode` &nbsp;&nbsp;&nbsp; *string*\n<br>\nIf the request fails, the API will return an HTTP 400 response, with one of these messages in the body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"message\\\": [\\n  {\\n    \\\"errorName\\\": \\\"UNABLE_TO_RESOLVE_CARD_INFO\\\",\\n    \\\"code\\\": 22010,\\n    \\\"description\\\": \\\"Unable to resolve credit card info.\\\"\\n  }\\n ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error: UNABLE_TO_RESOLVE_CARD_INFO\"\n    },\n    {\n      \"code\": \"{\\n  \\\"message\\\": [\\n  {\\n    \\\"errorName\\\": \\\"BIN_IS_NOT_VALID\\\",\\n    \\\"code\\\": 22011,\\n    \\\"description\\\": \\\"card number needs to be at least 6 digits long.\\\"\\n  }\\n ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error: BIN_IS_NOT_VALID\"\n    },\n    {\n      \"code\": \"{\\n  \\\"message\\\": [\\n  {\\n    \\\"errorName\\\": \\\"MISSING_CARD_NUMBER\\\",\\n    \\\"code\\\": 22012,\\n    \\\"description\\\": \\\"Card number is missing.\\\"\\n  }\\n ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error: MISSING_CARD_NUMBER\"\n    },\n    {\n      \"code\": \"{\\n  \\\"message\\\": [\\n  {\\n    \\\"errorName\\\": \\\"CARD_TYPE_NOT_SUPPORTED\\\",\\n    \\\"code\\\": 22013,\\n    \\\"description\\\": \\\"Card type is not supported.\\\"\\n  }\\n ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error: CARD_TYPE_NOT_SUPPORTED\"\n    },\n    {\n      \"code\": \"{\\n  \\\"message\\\": [\\n  {\\n    \\\"errorName\\\": \\\"CARD_NUMBER_NOT_VALID\\\",\\n    \\\"code\\\": 22014,\\n    \\\"description\\\": \\\"Card number is not valid.\\\"\\n  }\\n ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error: CARD_NUMBER_NOT_VALID\"\n    }\n  ]\n}\n[/block]\n\n<hr>\n\n##JSON Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\\"cardNumber\\\": 422211}'\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Card Info (plain card number - first 6 digits)\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\\"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=\\\"}'\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Card Info (encrypted card number)\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"cardSubType\\\": \\\"CREDIT\\\",\\n  \\\"cardCategory\\\": \\\"CLASSIC\\\",\\n  \\\"cardType\\\": \\\"VISA\\\",\\n  \\\"issuingCountryCode\\\": \\\"AT\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Retrieve Card Info Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \" </div>\\n <div id=\\\"menuxml\\\" class=\\\"tab-pane fade\\\">\"\n}\n[/block]\n###XML Request Content\n`credit-card` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F38A00\">**required**</span>, contains **one of** the following properties:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`card-number` *string* - first 6 digits only &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`encrypted-card-number` *string* &nbsp;&nbsp;&nbsp;optional\n\n###XML Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response body includes the following:\n`credit-card` *container* &nbsp;&nbsp;&nbsp; with the following properties:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`card-type` *string*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`card-sub-type` *string*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`card-category` *string* &nbsp;&nbsp;&nbsp;if relevant\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`issuing-country-code` *string*\n\nIf the request fails, the API will return an HTTP 400 response, with one of these messages in the body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<messages xmlns=\\\"http://ws.plimus.com\\\">\\n    <message>\\n        <error-name>UNABLE_TO_RESOLVE_CARD_INFO</error-name>\\n        <code>22010</code>\\n        <description>Unable to resolve credit card info.</description>\\n    </message>\\n</messages>\",\n      \"language\": \"xml\",\n      \"name\": \"Error: UNABLE_TO_RESOLVE_CARD_INFO\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<messages xmlns=\\\"http://ws.plimus.com\\\">\\n    <message>\\n        <error-name>BIN_IS_NOT_VALID</error-name>\\n        <code>22011</code>\\n        <description>card number needs to be at least 6 digits long.</description>\\n    </message>\\n</messages>\",\n      \"language\": \"xml\",\n      \"name\": \"Error: BIN_IS_NOT_VALID\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<messages xmlns=\\\"http://ws.plimus.com\\\">\\n    <message>\\n        <error-name>MISSING_CARD_NUMBER</error-name>\\n        <code>22012</code>\\n        <description>Card number is missing.</description>\\n    </message>\\n</messages>\",\n      \"language\": \"xml\",\n      \"name\": \"Error: MISSING_CARD_NUMBER\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<messages xmlns=\\\"http://ws.plimus.com\\\">\\n    <message>\\n        <error-name>CARD_TYPE_NOT_SUPPORTED</error-name>\\n        <code>22013</code>\\n        <description>Card type is not supported.</description>\\n    </message>\\n</messages>\",\n      \"language\": \"xml\",\n      \"name\": \"Error: CARD_TYPE_NOT_SUPPORTED\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<messages xmlns=\\\"http://ws.plimus.com\\\">\\n    <message>\\n        <error-name>CARD_NUMBER_NOT_VALID</error-name>\\n        <code>22014</code>\\n        <description>Card number is not valid.</description>\\n    </message>\\n</messages>\",\n      \"language\": \"xml\",\n      \"name\": \"Error: CARD_NUMBER_NOT_VALID\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##XML Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<credit-card xmlns=\\\"http://ws.plimus.com\\\">\\n<card-number>422211</card-number>\\n</credit-card>\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Card Info (plain card number - first 6 digits)\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/credit-card-info-resolver \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<credit-card  xmlns=\\\"http://ws.plimus.com\\\">\\n    <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>\\n</credit-card>'\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Card Info (encrypted card number)\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<credit-card xmlns=\\\"http://ws.plimus.com\\\">\\n    <card-type>VISA</card-type>\\n    <card-sub-type>CREDIT</card-sub-type>\\n    <card-category>CLASSIC</card-category>\\n    <issuing-country-code>AT</issuing-country-code>\\n</credit-card>\",\n      \"language\": \"xml\",\n      \"name\": \"Retrieve Card Info Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \" </div>\\n</div>\"\n}\n[/block]","excerpt":"","slug":"retrieve-card-info","type":"endpoint","title":"Retrieve Card Info"}

getRetrieve Card Info


Definition

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


Documentation

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
  • Issuing country code, such as US