Create Vaulted Shopper

To securely store your shopper's payment details in BlueSnap, you will perform the Create Vaulted Shopper request and BlueSnap will provide a BlueSnap token (vaultedShopperId) for that saved shopper.

You can then use the BlueSnap token in order to complete payment transactions, run subscriptions, improve the checkout experience for a returning shopper, and update the shopper's payment details. To see an example using the BlueSnap token for a returning shopper, see Returning Shoppers Guide.

📘

  • Each vaulted shopper can have multiple credit cards and multiple ACH accounts.
  • If you add a credit card to a vaulted shopper, BlueSnap will validate the card before adding it to the shopper.
  • To create a shopper with wallet details for Masterpass or Visa Checkout, including the payment info and billing and shipping info, you will simply include the walletId in the request. For details, see:

Try it in the API Explorer

Request Content

Send a vaultedShopper object with the following:

      paymentSources     object    optional (see paymentSources)
     firstName     string    optional
     lastName     string    optional
     softDescriptor     string    optional
     descriptorPhoneNumber string    optional
     merchantShopperId     string    optional
     country     string    optional
     state     string    optional
     city     string    optional
     address     string    optional
     address2     string    optional
     email     string    optional
     zip     string    optional
     phone     string    optional
     companyName     string     required for Corporate ECP accounts
     shopperCurrency     string    optional
     shippingContactInfo     object    optional (see shippingContactInfo)
     walletId     long    optional   Include if adding details for Masterpass or Visa Checkout
     transactionFraudInfo     object    optional (see transactionFraudInfo)
     transactionOrderSource     string    optional
     threeDSecure     object    optional (see threeDSecure)

Response Details

The response content depends on which version of the API you are using (see Authentication & headers), as follows:

  • API version 3.0
    If successful, the response HTTP status code is 200 OK.
    If you use ACH/ECP, the response includes the ecpDetails object, which replaces the ecpInfo object, allowing for multiple ACH accounts to be stored for the shopper.

  • API version 2.0
    If successful, the response HTTP status code is 200 OK.
    The response includes the vaultedShopper object, which contains all details that are saved for that shopper.
    The vaultedShopperId appears in the response body, as well as in the URL in the location header. In the example below, the vaultedShopperId is 20848977.

  • API version 1.0
    If successful, the response HTTP status code is 201 Created.
    The vaultedShopperId appears in the URL in the location header. In the example below, the vaultedShopperId is 19549020.
    There is no content in the response body.


Examples

Request Examples

For API Version 3.0

curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
		"merchantShopperId": "6783334400"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
    "country": "fr",
    "zip": "02453",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {
        "creditCardInfo": [
            {
                "billingContactInfo": {
                    "firstName": "FirstName",
                    "lastName": "LastName",
                    "zip": "02453",
                    "country": "us"
                },
                "creditCard": {
                    "cardNumber": "4111 1111 1111 1111",
                    "securityCode": "123",
                    "expirationMonth": "07",
                    "expirationYear": "2023"
                }
            }
        ]
        
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "paymentSources": {"creditCardInfo": [{
        "billingContactInfo": {
            "zip": "02453",
            "country": "US",
            "firstName": "billingFirstName",
            "lastName": "billingLastName",
            "address2": "Apt 1",
            "address1": "10 Main St",
            "state": "MA"
        },
        "creditCard": {
            "expirationYear": "2023",
            "securityCode": "837",
            "expirationMonth": "02",
            "cardNumber": "4263982640269299"
        }
    }]},
    "firstName": "FirstName",
    "lastName": "LastName",
    "transactionFraudInfo": {
        "shopperIpAddress": "123.12.134.1",
        "fraudSessionId": "1234",
        "company": "company",
        "shippingContactInfo": {
            "zip": "shippingZip",
            "country": "US",
            "firstName": "shippingLastName",
            "lastName": "shippingFirstName",
            "city": "shippingCity",
            "address2": "shippingAddress2",
            "address1": "shippingAddress1",
            "state": "AL"
        }
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "paymentSources": {"creditCardInfo": [{"creditCard": {
        "expirationYear": "2023",
        "encryptedCardNumber": "$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=",
        "encryptedSecurityCode": "$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=",
        "cardType": "VISA",
        "expirationMonth": "07"
    }}]},
    "firstName": "FirstName",
    "lastName": "LastName"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"walletId": "21"}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
    "country": "fr",
    "zip": "75001",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {
        "creditCardInfo": [
            {
                "pfToken" : "2b1383fa5f25c819bee03e01e060b2c0efae00dfdd963a62c6e106829d727b63_"
            }
        ]
        
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "paymentSources": {"creditCardInfo": [{"creditCard": {
        "expirationYear": "2023",
        "securityCode": "837",
        "expirationMonth": "02",
        "cardNumber": "4263982640269299"
    }}]},
    "firstName": "FirstName",
    "lastName": "LastName",
    "softDescriptor": "MYCOMPANY"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "firstName": "Jane", 
  "lastName": "Shopper", 
  "zip": "75001", 
  "country": "fr",
  "phone": "1234567890", 
  "paymentSources": {
    "sepaDirectDebitInfo": [{ "sepaDirectDebit": {
          "iban": "DE09100100101234567893"
    }}]}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
    "country": "us",
    "zip": "02453",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {  
      "ecpDetails":[  
         {  
            "ecp":{  
               "routingNumber":"011075150",
               "accountType":"CONSUMER_CHECKING",
               "accountNumber":"4099999992"
            }
         }
      ]
   }
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
   "zip":"12345",
   "country":"us",
   "paymentSources":{  
      "ecpDetails":[  
         {  
            "ecp":{  
               "routingNumber":"011075150",
               "accountType":"CONSUMER_CHECKING",
               "accountNumber":"4099999992"
            }
         },
         {  
            "ecp":{  
               "routingNumber":"011075151",
               "accountType":"CONSUMER_SAVINGS",
               "accountNumber":"4099999993"
            }
         }
      ]
   },
   "firstName":"FirstName",
   "lastName":"LastName",
   "phone":"1234567890"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
    "country": "fr",
    "zip": "02453",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "transactionOrderSource" : "MOTO",
    "paymentSources": {
    	"creditCardInfo": [
            {
                "billingContactInfo": {
                    "firstName": "FirstName",
                    "lastName": "LastName",
                    "zip": "02453",
                    "country": "us"
                },
                "creditCard": {
                    "cardNumber": "4111 1111 1111 1111",
                    "securityCode": "123",
                    "expirationMonth": "07",
                    "expirationYear": "2023"
                }
            }
        ]
    	
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
    "paymentSources": {
        "creditCardInfo": [
            {
                "creditCard": {
                    "encryptedCardNumber": "$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=",
                    "encryptedSecurityCode": "$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=",
                    "cardType": "VISA",
                    "expirationMonth": "07",
                    "expirationYear": "2023"
                }
            }
        ]
    },
    "threeDSecure": {
        "threeDSecureReferenceId": "5303"
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "John",
    "lastName": "Doe",
    "country": "au",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "AUD",
    "paymentSources": {
        "becsDirectDebitInfo": [
            {
                "becsDirectDebit": {
                    "bsbNumber": "880010",
                    "accountNumber": "4099999993",
                    "accountName": "John Doe",
                    "financialInstitution": "financialInstitution",
                    "branchName": "branchName",
                    "agreementId": 81
                }
            }
        ]
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

{
    "firstName": "Boris",
    "lastName": "Britva",
    "country": "ca",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "CAD",
    "paymentSources": {
        "acssDirectDebitInfo": [
            {
                "acssDirectDebit": {
                    "routingNumber": "9999999999",
                    "accountNumber": "4099999992",
                    "accountType": "PERSONAL",
                    "agreementId": 43
                }
            }
        ]
    }
}

For Previous API Versions

curl -L -X POST 'https://sandbox.bluesnap.com/services/2/vaulted-shoppers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'bluesnap-version: 2.0' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "firstName": "FirstName",
    "lastName": "LastName",
    "country": "us",
    "zip": "02453",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {
        "ecpInfo": {
            "ecp": {
                "routingNumber": "011075150",
                "accountType": "CONSUMER_CHECKING",
                "accountNumber": "4099999992"
            }
        }
    }
 }'

Response Examples

For API Version 3.0

{
  "vaultedShopperId": 19574802,
  "firstName": "FirstName",
  "lastName": "LastName",
  "merchantShopperId": "6783334400",
  "country": "fr",
  "zip": "175001",
  "phone": "1234567890",
  "softDescriptor": "BLS*BS",
  "shopperCurrency": "USD",
  "paymentSources": {
    "creditCardInfo": [
      {
        "billingContactInfo": {
          "firstName": "FirstName",
          "lastName": "LastName",
          "zip": "75001",
          "country": "us"
        },
        "creditCard": {
          "cardLastFourDigits": "1111",
          "cardType": "VISA",
          "cardSubType": "CREDIT",
          "binCategory": "CONSUMER",
          "cardRegulated": "N",
          "issuingBank": "JPMORGAN CHASE BANK, N.A.",
          "expirationMonth": "07",
          "expirationYear": "2023",
          "issuingCountryCode": "US"
        },
        "processingInfo": {
          "cvvResponseCode": "MA",
          "avsResponseCodeZip": "M",
          "avsResponseCodeAddress": "M",
          "avsResponseCodeName": "U",
          "networkTransactionId": "759211614372286"
        },
        "dateCreated": "09/30/2020",
        "timeCreated": "05:59:40"
      }
    ]
  },
  "fraudResultInfo": {
    "deviceDataCollector": "N"
  },
  "dateCreated": "09/22/2020",
  "timeCreated": "13:41:10"
}
{
  "vaultedShopperId": 19574600,
  "firstName": "FirstName",
  "lastName": "LastName",
  "country": "fr",
  "zip": "75001",
  "phone": "1234567890",
  "softDescriptor": "BLS*BS",
  "shopperCurrency": "USD",
  "paymentSources": {
    "creditCardInfo": [
      {
        "billingContactInfo": {
          "firstName": "FirstName",
          "lastName": "LastName",
          "zip": "02453",
          "country": "us"
        },
        "creditCard": {
          "cardLastFourDigits": "1111",
          "cardType": "VISA",
          "cardSubType": "CREDIT",
          "binCategory": "CONSUMER",
          "cardRegulated": "N",
          "issuingBank": "JPMORGAN CHASE BANK, N.A.",
          "expirationMonth": "07",
          "expirationYear": "2023",
          "issuingCountryCode": "US"
        },
        "processingInfo": {
          "cvvResponseCode": "MA",
          "avsResponseCodeZip": "M",
          "avsResponseCodeAddress": "M",
          "avsResponseCodeName": "U",
          "networkTransactionId": "759205478861907"
        },
        "dateCreated": "09/22/2020",
        "timeCreated": "10:41:12"
      }
    ]
  },
  "fraudResultInfo": {
    "deviceDataCollector": "N"
  },
  "transactionOrderSource": "MOTO",
  "dateCreated": "09/22/2020",
  "timeCreated": "13:41:10"
}
{
  "vaultedShopperId": 19574636,
  "firstName": "FirstName",
  "lastName": "LastName",
  "country": "fr",
  "zip": "75001",
  "phone": "1234567890",
  "softDescriptor": "BLS*BS",
  "shopperCurrency": "USD",
  "paymentSources": {
    "creditCardInfo": [
      {
        "billingContactInfo": {
          "firstName": "FirstName",
          "lastName": "LastName",
          "zip": "75001",
          "country": "fr"
        },
        "creditCard": {
          "cardLastFourDigits": "1000",
          "cardType": "VISA",
          "cardSubType": "CREDIT",
          "binCategory": "CONSUMER",
          "cardRegulated": "N",
          "expirationMonth": "01",
          "expirationYear": "2022",
          "issuingCountryCode": "US"
        },
        "processingInfo": {
          "cvvResponseCode": "NR",
          "avsResponseCodeZip": "N",
          "avsResponseCodeAddress": "N",
          "avsResponseCodeName": "U",
          "networkTransactionId": "019072416172166"
        },
        "dateCreated": "09/30/2020",
        "timeCreated": "05:59:40"
      }
    ]
  },
  "threeDSecure": {
    "authenticationResult": "AUTHENTICATION_SUCCEEDED"
  },
  "dateCreated": "09/22/2020",
  "timeCreated": "13:41:10"
}
{
  "vaultedShopperId": 19569754,
  "firstName": "FirstName",
  "lastName": "LastName",
  "country": "us",
  "zip": "12345",
  "phone": "1234567890",
  "shopperCurrency": "USD",
  "paymentSources": {
    "ecpDetails": [
      {
        "billingContactInfo": {
          "firstName": "FirstName",
          "lastName": "LastName"
        },
        "ecp": {
          "accountType": "CONSUMER_CHECKING",
          "publicAccountNumber": "99992",
          "publicRoutingNumber": "75150"
        },
        "dateCreated": "09/30/2020",
        "timeCreated": "05:48:18"
      },
      {
        "billingContactInfo": {
          "firstName": "FirstName",
          "lastName": "LastName"
        },
        "ecp": {
          "accountType": "CONSUMER_SAVINGS",
          "publicAccountNumber": "99993",
          "publicRoutingNumber": "75151"
        },
        "dateCreated": "09/30/2020",
        "timeCreated": "05:48:18"
      }
    ]
  },
  "fraudResultInfo": {"deviceDataCollector": "Y"},
  "dateCreated": "09/22/2020",
  "timeCreated": "13:41:10"
}
{
  "vaultedShopperId": 19582622,
  "firstName": "FirstName",
  "lastName": "LastName",
  "softDescriptor": "BLS*BS",
  "shopperCurrency": "USD",
  "paymentSources": {
    "creditCardInfo": [
      {
        "billingContactInfo": {
          "firstName": "FirstName",
          "lastName": "LastName"
        },
        "creditCard": {
          "cardLastFourDigits": "1091",
          "cardType": "VISA",
          "cardSubType": "CREDIT",
          "binCategory": "CONSUMER",
          "expirationMonth": "07",
          "expirationYear": "2023"
        },
        "processingInfo": {
          "cvvResponseCode": "NR",
          "avsResponseCodeZip": "U",
          "avsResponseCodeAddress": "U",
          "avsResponseCodeName": "U",
          "networkTransactionId": "020020314211584"
        },
        "dateCreated": "09/30/2020",
        "timeCreated": "05:59:40"
      }
    ]
  },
  "fraudResultInfo": {
    "deviceDataCollector": "N"
  },
  "threeDSecure": {
    "authenticationResult": "AUTHENTICATION_SUCCEEDED"
  },
  "dateCreated": "09/22/2020",
  "timeCreated": "13:41:10"
}
{
    "vaultedShopperId": 19610970,
    "firstName": "John",
    "lastName": "Doe",
    "country": "au",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "AUD",
    "paymentSources": {
        "becsDirectDebitInfo": [
            {
                "billingContactInfo": {
                    "firstName": "John",
                    "lastName": "Doe",
                    "zip": "12345",
                    "country": "au"
                },
                "becsDirectDebit": {
                    "bsbNumber": "880010",
                    "accountName": "John Doe",
                    "financialInstitution": "financialInstitution",
                    "branchName": "branchName",
                    "publicAccountNumber": "9993",
                    "agreementId": 81
                },
                "dateCreated": "07/08/2022",
                "timeCreated": "07:13:51"
            }
        ]
    },
    "fraudResultInfo": {},
    "dateCreated": "07/08/2022",
    "timeCreated": "07:13:51"
}
{
    "vaultedShopperId": 19610788,
    "firstName": "Boris",
    "lastName": "Britva",
    "country": "ca",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "CAD",
    "paymentSources": {
        "acssDirectDebitInfo": [
            {
                "billingContactInfo": {
                    "firstName": "Boris",
                    "lastName": "Britva",
                    "zip": "12345",
                    "country": "ca"
                },
                "acssDirectDebit": {
                    "routingNumber": "9999999999",
                    "accountType": "PERSONAL",
                    "publicAccountNumber": "9992",
                    "agreementId": 7573
                },
                "dateCreated": "06/27/2022",
                "timeCreated": "10:16:43"
            }
        ]
    },
    "fraudResultInfo": {},
    "dateCreated": "06/27/2022",
    "timeCreated": "10:16:43"
}

Responses for Previous API Versions

{
    "paymentSources": {"creditCardInfo": [{
        "billingContactInfo": {
            "firstName": "FirstName",
            "lastName": "LastName",
            "city": "",
            "companyName": "JohnDoeAndSons"
        },
        "processingInfo": {
            "avsResponseCodeAddress": "U",
            "cvvResponseCode": "MA",
            "avsResponseCodeName": "U",
            "avsResponseCodeZip": "U"
        },
        "fraudResultInfo": {"deviceDataCollector": "N"},
        "creditCard": {
            "expirationYear": 2023,
            "cardLastFourDigits": 9299,
            "cardSubType": "CREDIT",
            "cardType": "VISA",
            "cardCategory": "CLASSIC",
            "expirationMonth": "02"
        }
    }]},
    "firstName": "FirstName",
    "lastName": "LastName",
    "vaultedShopperId": 20848977,
    "shopperCurrency": "USD"
}
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549020
{
    "firstName": "FirstName",
    "lastName": " LastName",
    "country": "us",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "USD",
    "paymentSources": {
        "ecpInfo": {
            "ecp": {
                "routingNumber": "011075150",
                "accountType": "CONSUMER_CHECKING",
                "accountNumber": "4099999992"
            }
        }
    }
}

Back to Top


Example Descriptions

Basic Create Vaulted Shopper

This example shows a basic Create Vaulted Shopper request that saves the shopper in BlueSnap without any information about the shopper's payment methods.

Create Vaulted Shopper with credit card

To save credit card information for the shopper, you'll need to include the creditCardInfo property within the paymentSources object in your request. Note that you must meet specific PCI compliance requirements in order to send unencrypted card details.

Above is an example of a request with an unencrypted credit card number.

Create Vaulted Shopper with credit card and billing info

Optionally, you can include the shopper's billing info in the creditCardInfo property within the paymentSources object in your request. This can help improve the experience for returning shoppers, because you can save time by pre-populating the checkout form with their billing details.

Above is an example of a request with credit card details along with billing info.

Create Vaulted Shopper with credit card, billing info and fraud info

Optionally, you can include fraud info in the request, so that your fraud checks can run and verify that you are not saving a shopper with payment info that is suspected to be fraudulent.

Above is an example of a request with that includes fraud info such as the shopper's IP address and shipping address.

Create Vaulted Shopper with encrypted credit card

Your PCI compliance requirements and API permission level may require that you send credit card data in encrypted format only. To do this, you'll need to include theencryptedCardNumber and encryptedSecurityCode properties within the creditCardInfo object in your request.

Above is an example of a request with an encrypted credit card number.

Create Vaulted Shopper with wallet

To create a shopper with wallet details, including the payment info and billing and shipping info, you will simply include the walletId in the request. No other elements are required.

For details, see:

Above is an example of a request with a wallet ID.

Create Vaulted Shopper with Hosted Payment Fields token

If you are using BlueSnap's Hosted Payment Fields, you can save the shopper's payment information from the Hosted Payment Fields by including the token within the pfToken property in your request.

Above is an example of a request with the Hosted Payment Fields token.

Create Vaulted Shopper with credit card and soft descriptor

The above example shows how to create a shopper with a credit card and soft descriptor, which is the description that may appear on the shopper's bank statement when BlueSnap validates the card before adding it to the shopper.

Create Vaulted Shopper with SEPA Direct Debit

The above example shows a Create Vaulted Shopper request with bank account details for the SEPA Direct Debit payment method. Include the shopper's bank account details within paymentSources > sepaDirectDebitInfo > sepaDirectDebit. The shopper may have more than one saved bank accounts with the SEPA Direct Debit payment method.

Create Vaulted Shopper with ACH/ECP info

To save ACH/ECP account info for a shopper, include the ecpInfo element in your request. Only one ACH/ECP account can be saved per shopper.

Create Vaulted Shopper with multiple ACH accounts

The above example shows a Create Vaulted Shopper request for shoppers who have multiple ACH accounts. Include the shopper's account details within paymentSources > ecpDetails.

Create Vaulted Shopper with MOTO and NTI

The transactionOrderSource identifies the order as Mail Order Telephone Order. The response includes the networkTransactionId for the transaction.

Create Vaulted Shopper with 3DS

The response includes the 3DS result and the NTI (networkTransactionId) for the transaction. Save this for future transactions.


Back to Top

API Explorer

To test out a call, enter the request content below and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters and test credit card numbers to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{
    "paymentSources": {"creditCardInfo": [{"creditCard": {
        "expirationYear": 2023,
        "securityCode": 837,
        "expirationMonth": "02",
        "cardNumber": 4263982640269299
    }}]},
    "firstName": "FirstName",
    "lastName": "LastName"
}
Language
Authorization
:
Click Try It! to start a request and see the response here!