The sdkReponse
object will be passed to your callback function when the data submission to BlueSnap is completed (Step 4 of the implementation process). The object contains the results of the data submission.
Property | Type | Description |
---|---|---|
status | String | Status of the data submission. Possible values: _ Success - The data submission was successful. Finish the form submission to your server and process the transaction._ Invalid Data - There was a problem with the data passed to BlueSnap._ Inner Error - There was a problem with Secured Payment Collector._ Server Error - The BlueSnap server encountered a problem. |
code | Integer | The status code of the data submission. |
info | Object | This is present if any errors or warnings occurred. Contains:errors - An array of errorswarnings - An array of warnings |
cardData | Object | This is only present for card payments and if the data submission was successful (when sdkResponse.status is 1 ). Contains these properties. |
threeDSecure | Object | This is present only for card payments and if 3-D Secure was used. Contains these properties. |
{
"status": "Status",
"code": CODE,
"info": { // if an error or warning occurred
"errors": ['Some error'],
"warnings": ['Some warning']
},
"cardData": {
"binCategory": "CONSUMER",
"ccBin": "411111",
"cardSubType": "CREDIT",
"ccType": "VISA",
"last4Digits": "0002",
"isRegulatedCard": "Y",
"issuingCountry": "us"
},
"threeDSecure": {
"authResult": “AUTHENTICATION_SUCCEEDED”,
"threeDSecureReferenceId": "12345"
}
}
sdkResponse.code
Possible values for sdkResponse.code
:
Value | Description |
---|---|
1 | When sdkResponse.status is Sucess . |
10 | When sdkResponse.status is Invalid Data and an error prevents the data submission process from continuing (such as the currency provided is invalid). Check sdkResponse.info.errors for error details. |
15 | When sdkResponse.status is Invalid Data and the warning does not prevent the process from continuing (such as an invalid billing first name). Check sdkResponse.info.warnings for warning details. |
20 | When sdkResponse.status is Inner Error . |
Other codes are the BlueSnap server HTTP errors or generic server errors (400, 500). For example: | |
22013 | The credit card type is not supported for your configuration. |
14040 | The token is expired. Refresh the page. |
14042 | The token is not associated with a payment method. |
14104 | The shopper's credit card was not found. |
3-D Secure error codes | Applicable if 3-D Secure was used. See the 3-D Secure for API guide for a list of codes and descriptions. |
sdkResponse.info.errors
When an error occurs, details about the error will be present in sdkResponse.info.errors
. Errors prevent the data submission process from continuing.
Error | Description |
---|---|
Invalid amount: <given_amount> | An invalid amount was provided. |
Amount is mandatory and must be of type number | An amount wasn’t provided or provided not as a number. |
Currency <given_currency> is not supported | The given currency is not supported. |
Currency is mandatory | An amount wasn’t provided. |
Invalid ccNumber | The credit card number is invalid. |
Invalid cvv | The credit card CVV is invalid. |
Invalid expDate | The credit card expiration date is invalid. |
Invalid ccType | The credit card type is invalid. |
Invalid last4Digits | The last 4 digits of the credit card number are invalid. |
Invalid ecpRoutingNumber | The ECP routing number is invalid. |
Invalid ecpAccountType | The ECP account type is invalid. |
Invalid ecpAccountNumber | The ECP account number is invalid. |
sdkResponse.info.warnings
When sdkResponse.status
is 'Invalid Data'
, details about the warning will be present in sdkResponse.info.warnings
. Warnings inform you of conditions you might want to address. Unlike errors, warnings do not prevent your data collection or submission process from continuing.
Warning | Description |
---|---|
Parameter <given_key> with value of <given_value> is invalid | A parameter value is invalid. Keys verified through this process are email, shipping and billing details. |
sdkResponse.cardData
If the card data submission was successful (when sdkResponse.code
is 1
), non-sensitive payment details will be present in sdkResponse.cardData
.
Property | Type | Description |
---|---|---|
ccBin | String | The first 6 digits of the credit card. |
binCategory | String | Values can be: BUSINESS, CLASSIC, COMPANY, CONSUMER, CORPORATE, EXECUTIVE, GOLD, PERSONAL, PLATINUM, PREPAID, WORLD, etc. |
cardSubType | String | Values: CREDIT or DEBIT |
ccType | String | Values can be: VISA, MASTERCARD, AMERICAN EXPRESS, JCB, CHINA UNION PAY, etc. |
last4Digits | String | The last 4 digits of the credit card. |
isRegulatedCard | String | Values: Y or N |
issuingCountry | String | ISO 3166-1 alpha-2 code of the country where the credit card was issued. |
ccIssuingBank | String | The bank that issued the card. |
cardCategory | String | Possible Values: STANDARD/ENHANCED TRAVEL GOLD BUSINESS ATM CARD |
sdkResponse.threeDSecure
If 3-D Secure was used, sdkResponse.threeDSecure
will contain the authorization details.
Property | Type | Description |
---|---|---|
authResult | String | The 3-D Secure authorization result. |
threeDSecureReferenceId | String | The 3-D Secure reference ID. To process the transaction with 3-D Secure, this value needs to be included in the API call. |