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.

Try it in the API Explorer

Request Content

vaulted-shopper container    required, contains the following properties (see vaulted-shopper):
     first-name string    required if wallet-id is not sent
     last-name string    required if wallet-id is not sent
     soft-descriptor string    optional
     descriptor-phone-number 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
     company-name     string
     shopper-currency string    optional
     payment-sources container    optional, can contain credit-card-info (see payment-sources)
     shipping-contact-info container    optional (see shipping-contact-info)
     wallet-id long    optional   Include if adding Visa Checkout wallet details
     transaction-fraud-info container    optional (see transaction-fraud-info)
     three-d-secure container    optional (see three-d-secure)
     chosen-payment-method container    optional (see chosen-payment-method)

Response Details

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

API version 2.0 or 3.0
If successful, the response HTTP status code is 200 OK.
The response body includes the vaulted-shopper resource, 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/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <soft-descriptor>MyCompany</soft-descriptor>
   <payment-sources>
      <credit-card-info>
         <credit-card>
            <card-number>4263982640269299</card-number>
            <security-code>837</security-code>
            <expiration-month>02</expiration-month>
            <expiration-year>2023</expiration-year>
         </credit-card>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
   <wallet-id>21</wallet-id> 
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
    <payment-sources>
        <credit-card-info>
          <pf-token>9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_</pf-token>
        </credit-card-info>
     </payment-sources>
     <first-name>FirstName</first-name>
     <last-name>LastName</last-name>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>Jane</first-name>
   <last-name>Shopper</last-name>
   <zip>12345</zip>
   <phone>1234567890</phone>
   <country>fr</country>
   <payment-sources>
      <sepa-direct-debit-info>
         <sepa-direct-debit>
         	<iban>DE09100100101234567893</iban>
         </sepa-direct-debit>
      </sepa-direct-debit-info>
   </payment-sources>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <soft-descriptor>MyCompany</soft-descriptor>
   <payment-sources>
      <ecp-details>
      	<billing-contact-info>
        	<company-name>Scott LLC</company-name>
      	</billing-contact-info>
      	<ecp>
     		 <account-number>4099999992</account-number>
     		 <routing-number>011075150</routing-number>
     		 <account-type>CORPORATE_CHECKING</account-type>
     		</ecp>
      </ecp-details>
   </payment-sources>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <payment-sources>
      <credit-card-info>
         <credit-card>
            <card-last-four-digits>9299</card-last-four-digits>
            <card-type>VISA</card-type>
         </credit-card>
         <status>D</status>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
    <first-name>John</first-name>
    <last-name>Doe</last-name>
    <zip>12345</zip>
    <phone>1234567890</phone>
    <shopper-currency>USD</shopper-currency>
    <payment-sources>
        <ecp-details>
            <billing-contact-info>
                <first-name>John</first-name>
                <last-name>Doe</last-name>
                <zip>12345</zip>
            </billing-contact-info>
            <ecp>
                <account-type>CONSUMER_CHECKING</account-type>
                <public-account-number>99992</public-account-number>
                <public-routing-number>75150</public-routing-number>
            </ecp>
            <status>D</status>
        </ecp-details>
    </payment-sources>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
	<first-name>FirstName</first-name>
	<last-name>LastName</last-name>
	<country>fr</country>
	<zip>12345</zip>
	<phone>1234567890</phone>
	<payment-sources>
		<sepa-direct-debit-info>
			<billing-contact-info>
				<first-name>FirstName</first-name>
				<last-name>LastName</last-name>
			</billing-contact-info>
			<sepa-direct-debit>
				<iban-first-four>DE09</iban-first-four>
				<iban-last-four>7891</iban-last-four>
			</sepa-direct-debit>
			<status>D</status>
		</sepa-direct-debit-info>
	</payment-sources>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/29872832 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
  <first-name>Jane</first-name>
  <last-name>Shopper</last-name>
  <chosen-payment-method>
    <credit-card>
      <card-last-four-digits>9299</card-last-four-digits>
      <card-type>VISA</card-type>
    </credit-card>
  </chosen-payment-method>
</vaulted-shopper>'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <payment-sources>
      <credit-card-info>
         <credit-card>
            <card-last-four-digits>9299</card-last-four-digits>
            <card-type>VISA</card-type>
            <expiration-month>04</expiration-month>
            <expiration-year>2023</expiration-year>
            <security-code>837</security-code>
         </credit-card>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>'

Response Examples

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
  <vaulted-shopper-id>19549048</vaulted-shopper-id>
  <first-name>FirstName</first-name>
  <last-name>LastName</last-name>
  <company-name></company-name>
  <shopper-currency>USD</shopper-currency>
  <payment-sources>
    <ecp-details>
      <billing-contact-info>
        <first-name>FirstName</first-name>
        <last-name>LastName</last-name>
      </billing-contact-info>
      <ecp>
        <account-type>CONSUMER_CHECKING</account-type>
        <public-account-number>99992</public-account-number>
        <public-routing-number>75150</public-routing-number>
      </ecp>
      <date-created>09/30/2020</date-created>
      <time-created>05:48:18</time-created>
    </ecp-details>
    <ecp-details>
      <billing-contact-info>
        <first-name>FirstName</first-name>
        <last-name>LastName</last-name>
      </billing-contact-info>
      <ecp>
        <account-type>CONSUMER_SAVINGS</account-type>
        <public-account-number>99993</public-account-number>
        <public-routing-number>75151</public-routing-number>
      </ecp>
    </ecp-details>
    <ecp-details>
      <billing-contact-info>
        <first-name>FirstName</first-name>
        <last-name>LastName</last-name>
        <city></city>
        <company-name>Scott LLC</company-name>
      </billing-contact-info>
      <ecp>
        <account-type>CORPORATE_CHECKING</account-type>
        <public-account-number>99992</public-account-number>
        <public-routing-number>75150</public-routing-number>
      </ecp>
      <date-created>09/30/2020</date-created>
      <time-created>05:59:40</time-created>
    </ecp-details>
  </payment-sources>
  <fraud-result-info>
    <device-data-collector>Y</device-data-collector>
  </fraud-result-info>
  <date-created>09/22/2020</date-created>
  <time-created>13:41:10</time-created>
</vaulted-shopper>
HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
    <vaulted-shopper-id>19549048</vaulted-shopper-id>
    <first-name>FirstName</first-name>
    <last-name>LastName</last-name>
    <shopper-currency>USD</shopper-currency>
    <payment-sources>
        <credit-card-info>
            <billing-contact-info>
                <first-name>FirstName</first-name>
                <last-name>LastName</last-name>
                <city></city>
            </billing-contact-info>
            <credit-card>
                <card-last-four-digits>9299</card-last-four-digits>
                <card-type>VISA</card-type>
                <card-sub-type>CREDIT</card-sub-type>
                <card-category>CLASSIC</card-category>
                <expiration-month>02</expiration-month>
                <expiration-year>2023</expiration-year>
            </credit-card>
            <processing-info>
                <cvv-response-code>MA</cvv-response-code>
                <avs-response-code-zip>U</avs-response-code-zip>
                <avs-response-code-address>U</avs-response-code-address>
                <avs-response-code-name>U</avs-response-code-name>
            </processing-info>
        </credit-card-info>
    </payment-sources>
    <last-payment-info>
       <payment-method>CC</payment-method>
       <credit-card>
          <card-last-four-digits>0026</card-last-four-digits>
          <card-type>VISA</card-type>
       </credit-card>
    </last-payment-info>
    <fraud-result-info>
        <device-data-collector>N</device-data-collector>
    </fraud-result-info>
</vaulted-shopper>
HTTP/ 1.1 204 No Content

Example Descriptions

Add Credit Card

This example request shows how to add another credit card to an existing vaulted shopper.

Add Wallet Details using Wallet ID

This example request adds details from a wallet (e.g. Visa Checkout). This will add the credit card info from the wallet to the vaulted shopper.

Add Payment Details using Hosted Payment Fields token

This example request adds payment details collected by Hosted Payment Fields to the vaulted shopper.

Add bank account details for SEPA Direct Debit payment method

This example request adds bank account details for the SEPA Direct Debit payment method.

Update expiration date

This example request shows how to update the expiration date on a vaulted shopper credit card. For the update to happen, the full credit card number is not required. Include the card-last-four-digits, the card-type, and either the expiration-month, expiration-year, or both. The new card will then be authorized. Note: you are not required to specify the security-code, but if it is present, it will be used in the authorization process.

Delete* credit card

This example request shows how to delete a credit card from a vaulted shopper. Include the status property in the request and set its value to D. Specify the card to be deleted by including card-type and card-last-four-digits.

Delete* ACH/ECP

This example request shows how to delete an ACH/ECP payment method from a vaulted shopper. Include the status property in the request and set its value to D. Specify the ecp-details to be deleted by including account-type, public-account-number, and public-routing-number.

Delete* SEPA

This example request shows how to delete a SEPA payment method from a vaulted shopper. Include the status property in the request and set its value to D. Specify the sepa-direct-debit-info to be deleted by including iban-first-four and iban-last-four.

Add a chosen payment method

This example request shows how to specify a vaulted shopper's chosen (default) credit card from their saved credit cards. Include chosen-payment-method in the request with the card details. To create a transaction with the shopper's chosen card, simply omit the payment details from the transaction request. BlueSnap will use the shopper's default card to process the transaction.

* Notes on deleting a payment method
  • If you attempt to delete a payment method that is linked to a subscription, an error occurs. Send an Update Subscription request to either switch the shopper's payment source or to cancel the subscription, and then retry the Update Vaulted Shopper request to delete the payment method.

  • You cannot delete a payment method if there is a payment pending approval for the payment method.


Back to Top

API Explorer

To test out a call, in the vaulted-shopper-id field, enter the ID of an existing vaulted shopper. In the Body Content field, paste in the XML portion of the request and then click Try it!

Tip: Copy the XML portion from one of the example requests above, or use the XML 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.

<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <payment-sources>
      <credit-card-info>
         <credit-card>
            <card-number>4263982640269299</card-number>
            <security-code>837</security-code>
            <expiration-month>02</expiration-month>
            <expiration-year>2023</expiration-year>
         </credit-card>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>
Language
Credentials
:
Click Try It! to start a request and see the response here!