The Update Vaulted Shopper request enables you to update an existing vaulted shopper by changing their contact info, adding and deleting payment methods, or adding wallet details.
Note: We recommend that you first retrieve the vaulted shopper and then modify the desired property.
Each vaulted shopper can have multiple credit cards.
If you send a credit card number that does not yet exist in that vaulted shopper, BlueSnap validates the card as part of adding it to the shopper.
If you send a credit card number that does exist in that vaulted shopper, BlueSnap validates the card and updates the shopper with any changes to that card's expiration date.
Tip
You can test out a request that hits our sandbox in real-time. Follow the instructions here to use the "Try It!" feature on the right side.
Request Content
Send a vaultedShopper object, with the following:
Property | Type | Required |
---|---|---|
paymentSources | object | optional, can contain creditCardInfo (see paymentSources) |
firstName | string | required if walletId is not sent |
lastName | string | required if walletId is not sent |
merchantShopperId | string | optional |
softDescriptor | string | optional |
descriptorPhoneNumber | string | optional |
country | string | optional |
state | string | optional |
address | string | optional |
address2 | string | optional |
email | string | optional |
zip | string | optional |
phone | string | optional |
companyName | string | optional, include if adding Corporate ECP account details |
shopperCurrency | string | optional |
shippingContactInfo | object | optional (see shippingContactInfo) |
walletId | long | optional, include if adding wallet details for Visa Checkout |
transactionFraudInfo | object | optional (see transactionFraudInfo) |
threeDSecure | object | optional (see threeDSecure) |
chosenPaymentMethod | object | optional (see chosenPaymentMethod) |
Response Details
The response content depends on which version of the API you are using (see Authentication & headers), as follows:
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.
API version 1.0
If successful, the response HTTP status code is 204 No Content.
Examples
Request Examples
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-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 PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{"walletId": 21}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"paymentSources": {"creditCardInfo": [{
"pfToken": "9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_"
}]},
"firstName": "FirstName",
"lastName": "LastName"
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/21781965 \
-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 PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/21781965 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"zip":"02453",
"country":"us",
"paymentSources":{
"ecpDetails":[
{
"billingContactInfo":{
"firstName":"FirstName 2",
"lastName":"LastName 2"
},
"ecp":{
"routingNumber":"011075150",
"accountType":"CONSUMER_SAVINGS",
"accountNumber":"4099999992"
}
}
]
},
"firstName":"FirstName",
"lastName":"LastName",
"phone":"1234567890"
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "FirstName",
"lastName": "LastName",
"paymentSources": {"creditCardInfo": [{"creditCard": {
"cardType": "VISA",
"cardLastFourDigits": "9299"
},
"status": "D"}]}
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "John",
"lastName": "Doe",
"zip": "02453",
"phone": "1234567890",
"shopperCurrency": "USD",
"paymentSources": {
"ecpDetails": [
{
"billingContactInfo": {
"firstName": "John",
"lastName": "Doe",
"zip": "02453"
},
"ecp": {
"accountType": "CONSUMER_CHECKING",
"publicAccountNumber": "99992",
"publicRoutingNumber": "75150"
},
"status":"D"
}
]
}
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-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": {
"sepaDirectDebitInfo": [
{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName"
},
"sepaDirectDebit": {
"ibanFirstFour": "DE09",
"ibanLastFour": "7893"
},
"status":"D"
}
]
}
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/29872832 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"firstName": "Jane",
"lastName": "Shopper",
"chosenPaymentMethod": {
"chosenPaymentMethodType": "CC",
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA"
}
}
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"paymentSources": {"creditCardInfo": [{"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA"
"expirationMonth": "04",
"expirationYear": "2023",
"securityCode": 837
}}]},
"firstName": "FirstName",
"lastName": "LastName"
}
Response Examples
{
"vaultedShopperId": 19549048,
"firstName": "FirstName",
"lastName": "LastName",
"country": "us",
"zip": "02453",
"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:59:40"
},
{
"billingContactInfo": {
"firstName": "FirstName 2",
"lastName": "LastName 2"
},
"ecp": {
"accountType": "CONSUMER_SAVINGS",
"publicAccountNumber": "99992",
"publicRoutingNumber": "75150"
},
"dateCreated": "09/30/2020",
"timeCreated": "05:59:40"
}
]
},
"fraudResultInfo": {"deviceDataCollector": "Y"},
"dateCreated": "09/22/2020",
"timeCreated": "13:41:10"
}
{
"paymentSources": {"creditCardInfo": [{
"billingContactInfo": {
"firstName": "FirstName",
"lastName": "LastName",
"city": ""
},
"processingInfo": {
"avsResponseCodeAddress": "U",
"cvvResponseCode": "MA",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "U"
},
"creditCard": {
"expirationYear": 2023,
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"expirationMonth": "02"
}
}]},
"firstName": "FirstName",
"lastName": "LastName",
"vaultedShopperId": 19549048,
"shopperCurrency": "USD",
"lastPaymentInfo": {
"paymentMethod": "CC",
"creditCard": {
"cardLastFourDigits": "0026",
"cardType": "VISA",
"cardCategory": "CLASSIC"
}
},
"fraudResultInfo": {"deviceDataCollector": "N"}
}
HTTP/ 1.1 204 No Content
API Explorer
To test out a basic API request, click the "Try It!" button in the right-hand column to test using the default, pre-populated sample values. To test with your own values, edit the parameter fields below. You'll see them populate in the right-hand column and you can click the "Try It!" button to submit your test request and see a response.