{"_id":"59a45d457ee621000fc9d3ee","category":{"_id":"59a45d447ee621000fc9d3bf","version":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-19T18:31:30.299Z","from_sync":false,"order":7,"slug":"vaulted-shopper-service","title":"Vaulted Shoppers"},"parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","version":{"_id":"59a45d437ee621000fc9d3b7","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-08-28T18:13:23.840Z","releaseDate":"2017-08-28T18:13:23.840Z","categories":["59a45d447ee621000fc9d3b8","59a45d447ee621000fc9d3b9","59a45d447ee621000fc9d3ba","59a45d447ee621000fc9d3bb","59a45d447ee621000fc9d3bc","59a45d447ee621000fc9d3bd","59a45d447ee621000fc9d3be","59a45d447ee621000fc9d3bf","59a45d447ee621000fc9d3c0","59a45d447ee621000fc9d3c1","59a45d447ee621000fc9d3c2","59a45d447ee621000fc9d3c3","59a45d447ee621000fc9d3c4","59a45d447ee621000fc9d3c5","59a45d447ee621000fc9d3c6","59a45d447ee621000fc9d3c7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.22.1","version_clean":"8976.0.0-XML","version":"8976-XML"},"__v":8,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-29T14:37:53.446Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[{"language":"text","code":""}]},"settings":"","auth":"optional","params":[{"_id":"56ab9094f25f160d00e17f11","ref":"","in":"path","required":false,"desc":"vaulted-shopper-id received from BlueSnap","default":"","type":"string","name":"vaulted-shopper-id"}],"url":"/vaulted-shoppers/:vaulted-shopper-id"},"isReference":true,"order":17,"body":"The Update Vaulted Shopper request enables you to update an existing vaulted shopper by changing their contact info, adding credit card details, or adding wallet details.\n\n**Note**: It is suggested that you first retrieve the vaulted shopper and then modify the desired property.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"* Each vaulted shopper can have multiple credit cards.\\n\\n* If you send a credit card number that does not yet exist in that vaulted shopper, BlueSnap will validate the card as part of adding it to the shopper.\\n\\n* If you send a credit card number that does exist in that vaulted shopper, BlueSnap will validate the card and update the shopper with any changes to that card's expiration date.\\n\\n* You will obtain the `walletId` when the shopper successfully completes the MasterPass payment step. For a complete walkthrough of the flow for Masterpass, see [Implementing Masterpass via the API](/v1.0/docs/masterpass#section-implementing-masterpass-via-the-api).\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer-api-version-2-0-\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n`vaulted-shopper` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [vaulted-shopper](doc:vaulted-shopper)):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`first-name` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** if `wallet-id` is not sent</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`last-name` *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** if `wallet-id` is not sent</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`soft-descriptor` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`country` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`state` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`city` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`address` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`address2` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`email` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`zip` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`phone` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`company-name` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp; optional &nbsp; Include if adding Corporate ECP account details \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shopper-currency` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payment-sources` *container* &nbsp;&nbsp;&nbsp;optional, can contain `credit-card-info` (see [payment-sources](doc:payment-sources))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shipping-contact-info` *container* &nbsp;&nbsp;&nbsp;optional (see [shipping-contact-info](doc:shipping-contact-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`wallet-id` *long* &nbsp;&nbsp;&nbsp;optional &nbsp; Include if adding MasterPass or Visa Checkout wallet details\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transaction-fraud-info` *container* &nbsp;&nbsp;&nbsp;optional (see [transaction-fraud-info](doc:transaction-fraud-info))\n\n###Response Details\nThe response content depends on which version of the API you are using (see [Authentication & headers](/v1.0/docs/authentication)), as follows:\n\n**API version 2.0**\nIf successful, the response HTTP status code is 200 OK.\nThe response body includes the [vaulted-shopper](doc:vaulted-shopper) resource, which contains all details that are saved for that shopper.\n\n**API version 1.0**\nIf successful, the response HTTP status code is 204 No Content.\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n   <first-name>FirstName</first-name>\\n   <last-name>LastName</last-name>\\n   <soft-descriptor>MyCompany</soft-descriptor>\\n   <payment-sources>\\n      <credit-card-info>\\n         <credit-card>\\n            <card-number>4263982640269299</card-number>\\n            <security-code>837</security-code>\\n            <expiration-month>02</expiration-month>\\n            <expiration-year>2018</expiration-year>\\n         </credit-card>\\n      </credit-card-info>\\n   </payment-sources>\\n</vaulted-shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"Update Vaulted Shopper Request: add credit card\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n   <wallet-id>21</wallet-id> \\n</vaulted-shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with wallet ID\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n    <payment-sources>\\n        <credit-card-info>\\n          <pf-token>9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_</pf-token>\\n        </credit-card-info>\\n     </payment-sources>\\n     <first-name>FirstName</first-name>\\n     <last-name>LastName</last-name>\\n     <vaulted-shopper-id>19549048</vaulted-shopper-id>\\n</vaulted-shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with Hosted Payment Fields token \"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549048 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n   <first-name>Jane</first-name>\\n   <last-name>Shopper</last-name>\\n   <zip>12345</zip>\\n   <phone>1234567890</phone>\\n   <country>fr</country>\\n   <payment-sources>\\n      <sepa-direct-debit-info>\\n         <sepa-direct-debit>\\n         \\t<iban>DE09100100101234567893</iban>\\n         </sepa-direct-debit>\\n      </sepa-direct-debit-info>\\n   </payment-sources>\\n</vaulted-shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with SEPA Direct Debit \"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 200 OK\\n\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n    <vaulted-shopper-id>19549048</vaulted-shopper-id>\\n    <first-name>FirstName</first-name>\\n    <last-name>LastName</last-name>\\n    <shopper-currency>USD</shopper-currency>\\n    <payment-sources>\\n        <credit-card-info>\\n            <billing-contact-info>\\n                <first-name>FirstName</first-name>\\n                <last-name>LastName</last-name>\\n                <city></city>\\n            </billing-contact-info>\\n            <credit-card>\\n                <card-last-four-digits>9299</card-last-four-digits>\\n                <card-type>VISA</card-type>\\n                <card-sub-type>CREDIT</card-sub-type>\\n                <card-category>CLASSIC</card-category>\\n                <expiration-month>02</expiration-month>\\n                <expiration-year>2018</expiration-year>\\n            </credit-card>\\n            <processing-info>\\n                <cvv-response-code>MA</cvv-response-code>\\n                <avs-response-code-zip>U</avs-response-code-zip>\\n                <avs-response-code-address>U</avs-response-code-address>\\n                <avs-response-code-name>U</avs-response-code-name>\\n            </processing-info>\\n        </credit-card-info>\\n    </payment-sources>\\n    <last-payment-info>\\n       <payment-method>CC</payment-method>\\n       <credit-card>\\n          <card-last-four-digits>0026</card-last-four-digits>\\n          <card-type>VISA</card-type>\\n       </credit-card>\\n    </last-payment-info>\\n    <fraud-result-info>\\n        <device-data-collector>N</device-data-collector>\\n    </fraud-result-info>\\n</vaulted-shopper>\",\n      \"language\": \"xml\",\n      \"name\": \"Update Vaulted Shopper Response: 200 OK - API v2.0\"\n    },\n    {\n      \"code\": \"HTTP/ 1.1 204 No Content\",\n      \"language\": \"http\",\n      \"name\": \"204 No Content - API v1.0\"\n    }\n  ]\n}\n[/block]\n##Example Descriptions\n###Add Credit Card\nThis example request shows how to add another credit card to an existing vaulted shopper.\n\n###Add Wallet Details using Wallet ID\nThis example request adds details from a wallet (e.g. MasterPass). This will add the credit card info from the wallet to the vaulted shopper.\n\n###Add Payment Details using Hosted Payment Fields token\nThis example request adds payment details collected by Hosted Payment Fields to the vaulted shopper.\n\n###Add bank account details for SEPA Direct Debit payment method \nThis example request adds bank account details for the [SEPA Direct Debit](/v1.0/docs/sepa-direct-debit) payment method.\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer (API version 2.0)\nTo 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!**\n\n**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.*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n   <first-name>FirstName</first-name>\\n   <last-name>LastName</last-name>\\n   <payment-sources>\\n      <credit-card-info>\\n         <credit-card>\\n            <card-number>4263982640269299</card-number>\\n            <security-code>837</security-code>\\n            <expiration-month>02</expiration-month>\\n            <expiration-year>2018</expiration-year>\\n         </credit-card>\\n      </credit-card-info>\\n   </payment-sources>\\n</vaulted-shopper>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"update-vaulted-shopper","type":"put","title":"Update Vaulted Shopper"}

putUpdate Vaulted Shopper


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

vaulted-shopper-id:
string
vaulted-shopper-id received from BlueSnap

Documentation

The Update Vaulted Shopper request enables you to update an existing vaulted shopper by changing their contact info, adding credit card details, or adding wallet details.

Note: It is suggested 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 will validate 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 will validate the card and update the shopper with any changes to that card's expiration date.

  • You will obtain the walletId when the shopper successfully completes the MasterPass payment step. For a complete walkthrough of the flow for Masterpass, see Implementing Masterpass via the API.

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
      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     optional   Include if adding Corporate ECP account details
      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 MasterPass or Visa Checkout wallet details
      transaction-fraud-info container    optional (see transaction-fraud-info)

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 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>2018</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-id>19549048</vaulted-shopper-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">
   <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>'

Response Examples

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>2018</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. MasterPass). 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.



Back to Top


API Explorer (API version 2.0)

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>2018</expiration-year>
         </credit-card>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}