sdkResponse object

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.

PropertyTypeDescription
statusStringStatus 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.
codeIntegerThe status code of the data submission.
infoObjectThis is present if any errors or warnings occurred. Contains:

errors - An array of errors
warnings - An array of warnings
cardDataObjectThis is only present for card payments and if the data submission was successful (when sdkResponse.status is 1). Contains these properties.
threeDSecureObjectThis 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:

ValueDescription
1When sdkResponse.status is Sucess.
10When 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.
15When 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.
20When sdkResponse.status is Inner Error.
Other codes are the BlueSnap server HTTP errors or generic server errors (400, 500). For example:
22013The credit card type is not supported for your configuration.
14040The token is expired. Refresh the page.
14042The token is not associated with a payment method.
14104The shopper's credit card was not found.
3-D Secure error codesApplicable 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.

ErrorDescription
Invalid amount: <given_amount>An invalid amount was provided.
Amount is mandatory and must be of type numberAn amount wasn’t provided or provided not as a number.
Currency <given_currency> is not supportedThe given currency is not supported.
Currency is mandatoryAn amount wasn’t provided.
Invalid ccNumberThe credit card number is invalid.
Invalid cvvThe credit card CVV is invalid.
Invalid expDateThe credit card expiration date is invalid.
Invalid ccTypeThe credit card type is invalid.
Invalid last4DigitsThe last 4 digits of the credit card number are invalid.
Invalid ecpRoutingNumberThe ECP routing number is invalid.
Invalid ecpAccountTypeThe ECP account type is invalid.
Invalid ecpAccountNumberThe 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.

WarningDescription
Parameter <given_key> with value of <given_value> is invalidA 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.

PropertyTypeDescription
ccBinStringThe first 6 digits of the credit card.
binCategoryStringValues can be: BUSINESS, CLASSIC, COMPANY, CONSUMER, CORPORATE, EXECUTIVE, GOLD, PERSONAL, PLATINUM, PREPAID, WORLD, etc.
cardSubTypeStringValues: CREDIT or DEBIT
ccTypeStringValues can be: VISA, MASTERCARD, AMERICAN EXPRESS, JCB, CHINA UNION PAY, etc.
last4DigitsStringThe last 4 digits of the credit card.
isRegulatedCardStringValues: Y or N
issuingCountryStringISO 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.

PropertyTypeDescription
authResultStringThe 3-D Secure authorization result.
threeDSecureReferenceIdStringThe 3-D Secure reference ID. To process the transaction with 3-D Secure, this value needs to be included in the API call.