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 |
|---|---|---|
| String | Status of the data submission. Possible values:
|
| Integer | The status code of the data submission. |
| Object | This is present if any errors or warnings occurred. Contains: |
| Object | This is only present for card payments and if the data submission was successful (when |
| 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 |
|---|---|
| When |
| When |
| When |
| When |
Other codes are the BlueSnap server HTTP errors or generic server errors (400, 500). For example: | |
| The credit card type is not supported for your configuration. |
| The token is expired. Refresh the page. |
| The token is not associated with a payment method. |
| 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 |
|---|---|
| An invalid amount was provided. |
| An amount wasn’t provided or provided not as a number. |
| The given currency is not supported. |
| An amount wasn’t provided. |
| The credit card number is invalid. |
| The credit card CVV is invalid. |
| The credit card expiration date is invalid. |
| The credit card type is invalid. |
| The last 4 digits of the credit card number are invalid. |
| The ECP routing number is invalid. |
| The ECP account type is invalid. |
| 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 |
|---|---|
| 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 |
|---|---|---|
| String | The first 6 digits of the credit card. |
| String | Values can be: BUSINESS, CLASSIC, COMPANY, CONSUMER, CORPORATE, EXECUTIVE, GOLD, PERSONAL, PLATINUM, PREPAID, WORLD, etc. |
| String | Values: CREDIT or DEBIT |
| String | Values can be: VISA, MASTERCARD, AMERICAN EXPRESS, JCB, CHINA UNION PAY, etc. |
| String | The last 4 digits of the credit card. |
| String | Values: Y or N |
| String | ISO 3166-1 alpha-2 code of the country where the credit card was issued. |
sdkResponse.threeDSecure
If 3-D Secure was used, sdkResponse.threeDSecure will contain the authorization details.
Property | Type | Description |
|---|---|---|
| String | The 3-D Secure authorization result. |
| 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. |
