Update Vaulted Shopper

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.

Request Content

Update URL based on Vaulted Shopper ID

Enter the vaultedShopperId into the web service URL, in the format:
services/2/vaulted-shoppers/{vaultedShopperId}

For example:
services/2/vaulted-shoppers/20769005

Update URL based on Merchant Shopper ID

Enter the merchantShopperId in the web service URL, in the format:
services/2/vaulted-shoppers/merchant/{merchantShopperId}

For example:
services/2/vaulted-shoppers/merchant/6783334400

Body

Send a vaultedShopper object, with the following:

PropertyTypeRequired
addressstringoptional
address2stringoptional
chosenPaymentMethodobjectoptional (see chosenPaymentMethod)
companyNamestringoptional, include if adding Corporate ECP account details
countrystringoptional
descriptorPhoneNumberstringoptional
emailstringoptional
firstNamestringrequired if walletId is not sent
lastNamestringrequired if walletId is not sent
merchantShopperIdstringoptional
paymentSourcesobjectoptional, can contain creditCardInfo or payByBankInfo (see paymentSources)
pfTokenstringrequired for Hosted Payment Fields. Unique token that contains the shopper's payment information for the transaction.
phonestringoptional
shippingContactInfoobjectoptional (see shippingContactInfo)
shopperCurrencystringoptional
softDescriptorstringoptional
statestringoptional
threeDSecureobjectoptional (see threeDSecure)
transactionFraudInfoobjectoptional (see transactionFraudInfo)
transactionOrderSourcestringoptional
walletIdlongoptional, include if adding wallet details for Visa Checkout
zipstringoptional

Response Details

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

API version 2.0 and higher
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.

Back to Top


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 QVBJXzE2MTk2MjgyMzU0ODkyMDM5MTMzODc0OkFsdG9pZHMxIQ==' \
-d '
{
  "pfToken": "2b1383fa5f25c819bee03e01e060b2c0efae00dfdd963a62c6e106829d727b63_",
  "firstName": "FirstName",
  "lastName": "LastName",
  "transactionFraudInfo1":{  
      "fraudSessionId":"apiFraudSessionId",
      "shopperIpAddress":"10.20.30.40"
   }
}'
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 QVBJXzE2MTk2MjgyMzU0ODkyMDM5MTMzODc0OkFsdG9pZHMxIQ==' \
-d '
{
  "pfToken": "2b1383fa5f25c819bee03e01e060b2c0efae00dfdd963a62c6e106829d727b63_",  
  "firstName": "FirstName",
  "lastName": "LastName",
  "country": "us",
  "state": "ca",
  "address": "Blue Lane 21",
  "zip": 12345,
  "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"
}
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",
         "country": "de",
         "zip": "12345",
         "phone": "1234567890",
         "shopperCurrency": "EUR",
         "paymentSources": {
             "payByBankInfo": [
                 {
                     "payByBank": {
                         "iban": "DE12345678901234567890"
                     }
                 }
             ]
         }
     }'
curl -v -X PUT 'https://sandbox.bluesnap.com/services/2/vaulted-shoppers/12345678' \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -d '
     {
         "firstName": "Jane",
         "lastName": "Shopper",
         "country": "de",
         "zip": "12345",
         "phone": "1234567890",
         "shopperCurrency": "EUR",
         "paymentSources": {
             "payByBankInfo": [
                 {
                     "billingContactInfo": {
                         "firstName": "John",
                         "lastName": "Doe",
                         "zip": "12345",
                         "country": "de"
                     },
                     "payByBank": {
                         "iban": "DE12345678901234567890"
                     }
                 }
             ]
         }
     }'

curl -v -X PUT 'https://sandbox.bluesnap.com/services/2/vaulted-shoppers/12345678' \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -d '
     {
         "firstName": "Jane",
         "lastName": "Shopper",
         "country": "de",
         "zip": "12345",
         "phone": "1234567890",
         "shopperCurrency": "EUR",
         "paymentSources": {
             "payByBankInfo": [
                 {
                     "billingContactInfo": {
                         "firstName": "Jane",
                         "lastName": "Doe",
                         "zip": "12345",
                         "country": "uk"
                     },
                     "payByBank": {
                         "iban": "DE12345678901234567890"
                     },
                     "status": "D"
                 }
             ]
         }
     }'

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
{
    "vaultedShopperId": 12345678,
    "firstName": "Jane",
    "lastName": "Shopper",
    "country": "de",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "EUR",
    "paymentSources": {
        "payByBankInfo": [
            {
                "billingContactInfo": {
                    "firstName": "Jane",
                    "lastName": "Shopper",
                    "zip": "12345",
                    "country": "de"
                },
                "payByBank": {
                    "ibanFirstFour": "DE73",
                    "ibanLastFour": "4946"
                },
                "dateCreated": "05/03/2024",
                "timeCreated": "08:18:59",
                "dateModified": "05/03/2024",
                "timeModified": "08:18:59"
            }
        ]
    },
    "fraudResultInfo": {},
    "dateCreated": "05/03/2024",
    "timeCreated": "08:18:59"
}
{
    "vaultedShopperId": 12345678,
    "firstName": "Jane",
    "lastName": "Shopper",
    "country": "uk",
    "zip": "12345",
    "phone": "1234567890",
    "shopperCurrency": "EUR",
    "paymentSources": {},
    "fraudResultInfo": {},
    "dateCreated": "05/03/2024",
    "timeCreated": "08:19:40"
}

Back to Top


API Explorer

BlueSnap provides a sandbox environment so you can test basic requests with this endpoint. You can view the request in the API Explorer console and its response directly below the console.

The console includes a sample request with predefined parameter values. To send a request with custom values, edit the parameter fields below. As you edit the fields, your custom values display in the request in the console.

Click the Try it! button below the request example when you are ready to send your request.

Language
Credentials
Header
Click Try It! to start a request and see the response here!