{"_id":"59a45d457ee621000fc9d3ed","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":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-28T20:04:43.276Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"language":"text","code":""}]},"settings":"","auth":"optional","params":[],"url":"/vaulted-shoppers"},"isReference":true,"order":16,"body":"The Create Vaulted Shopper request enables you to store a shopper's details (including payment info) securely in BlueSnap. BlueSnap will provide a token (`vaulted-shopper-id`) for that saved shopper.\n\nYou can then use the `vaulted-shopper-id` in order to complete payment transactions, improve the checkout experience for a returning shopper, and update the shopper's payment details. For an example of using the `vaulted-shopper-id` for a returning shopper, see [Returning shopper tutorial](doc:returning-shopper-tutorial).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"* Each vaulted shopper can have multiple credit cards.\\n* If you add a credit card to a vaulted shopper, BlueSnap will validate the card before adding it to the shopper. \\n* 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:\\n  * [MasterPass Guide](/v1.0/docs/masterpass)\\n  * [Visa Checkout Guide](/v1.0/docs/visa-checkout)\"\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;`merchant-shopper-id` *string* &nbsp;&nbsp;&nbsp;optional\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;<span style=\"color:#F37500\">`company-name` </span>&nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp; **required** for Corporate ECP accounts\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 (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.\nThe `vaulted-shopper-id` appears in the response body, as well as in the URL in the location header. In the example below, the `vaulted-shopper-id` is **20848977**.\n\n**API version 1.0**\nIf successful, the response HTTP status code is 201 Created.\nThe `vaulted-shopper-id` appears in the URL in the location header. In the example below, the `vaulted-shopper-id` is **19549020**.\nThere is no content in the response body.\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\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</vaulted-shopper>\",\n      \"language\": \"curl\",\n      \"name\": \"Create Vaulted Shopper Request: basic\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\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   <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\": \"with credit card\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\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   <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         <billing-contact-info>\\n            <first-name>billingFirstName</first-name>\\n            <last-name>billingLastName</last-name>\\n            <country>US</country>\\n            <state>MA</state>\\n            <address1>10 Main St</address1>\\n            <address2>Apt 1</address2>\\n            <email>email:::at:::example.com</email>\\n            <zip>01752</zip>\\n         </billing-contact-info>\\n      </credit-card-info>\\n   </payment-sources>\\n</vaulted-shopper>\",\n      \"language\": \"curl\",\n      \"name\": \"with credit card and billing info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\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   <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         <billing-contact-info>\\n            <first-name>billingFirstName</first-name>\\n            <last-name>billingLastName</last-name>\\n            <country>US</country>\\n            <state>MA</state>\\n            <address1>10 Main St</address1>\\n            <address2>Apt 1</address2>\\n            <email>email@example.com</email>\\n            <zip>01752</zip>\\n         </billing-contact-info>\\n      </credit-card-info>\\n   </payment-sources>\\n   <transaction-fraud-info>\\n      <fraud-session-id>1234</fraud-session-id>\\n      <shopper-ip-address>123.12.134.1</shopper-ip-address>\\n      <company>company</company>\\n      <shipping-contact-info>\\n         <last-name>shippingFirstName</last-name>\\n         <first-name>shippingLastName</first-name>\\n         <country>US</country>\\n         <state>AL</state>\\n         <city>shippingCity</city>\\n         <address1>shippingAddress1</address1>\\n         <address2>shippingAddress2</address2>\\n         <zip>shippingZip</zip>\\n      </shipping-contact-info>\\n   </transaction-fraud-info>\\n</vaulted-shopper>\",\n      \"language\": \"curl\",\n      \"name\": \"with credit card, billing info and fraud info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\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   <payment-sources>\\n      <credit-card-info>\\n         <credit-card>\\n            <encrypted-card-number>$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=</encrypted-card-number>\\n           <encrypted-security-code>$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=</encrypted-security-code>\\n          <card-type>VISA</card-type>\\n          <expiration-month>07</expiration-month>\\n          <expiration-year>2016</expiration-year>\\n        </credit-card>\\n     </credit-card-info>\\n   </payment-sources>\\n</vaulted-shopper>\",\n      \"language\": \"curl\",\n      \"name\": \"with encrypted card details\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\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 POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<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            <pf-token>9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_</pf-token>\\n      </credit-card-info>\\n   </payment-sources>\\n</vaulted-shopper>\",\n      \"language\": \"curl\",\n      \"name\": \"with Hosted Payment Fields token\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n   <first-name>FirstName</first-name>\\n   <last-name>LastName</last-name>\\n   <country>us</country>\\n   <zip>12345</zip>\\n   <phone>1234567890</phone>\\n   <payment-sources>\\n      <ecp-info>\\n         <ecp>\\n          <account-number>4099999992</account-number>\\n          <routing-number>011075150</routing-number>\\n          <account-type>CONSUMER_CHECKING</account-type>\\n         </ecp>\\n      </ecp-info>\\n   </payment-sources>\\n</vaulted-shopper>\",\n      \"language\": \"curl\",\n      \"name\": \"with ACH/ECP\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\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\": \"with credit card and soft descriptor\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\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   <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\\nLocation: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/20848977\\n\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<vaulted-shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <vaulted-shopper-id>20848977</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      <fraud-result-info>\\n        <device-data-collector>N</device-data-collector>\\n      </fraud-result-info>\\n    </credit-card-info>\\n  </payment-sources>\\n</vaulted-shopper>\",\n      \"language\": \"xml\",\n      \"name\": \"Create Vaulted Shopper Response: 200 OK - API v2.0\"\n    },\n    {\n      \"code\": \"HTTP/ 1.1 201 Created\\nLocation: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549020\",\n      \"language\": \"http\",\n      \"name\": \"201 Created - API v1.0\"\n    }\n  ]\n}\n[/block]\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##Example Descriptions\nFor details about the above examples, see:\n  * [Basic Create Vaulted Shopper](create-vaulted-shopper#section-basic-create-vaulted-shopper)\n  * [Create Vaulted Shopper with credit card](create-vaulted-shopper#section-create-vaulted-shopper-with-credit-card)\n  * [Create Vaulted Shopper with credit card and billing info](create-vaulted-shopper#section-create-vaulted-shopper-with-credit-card-and-billing-info)\n  * [Create Vaulted Shopper with credit card, billing info and fraud info](create-vaulted-shopper#section-create-vaulted-shopper-with-credit-card-billing-info-and-fraud-info)\n  * [Create Vaulted Shopper with encrypted credit card](create-vaulted-shopper#section-create-vaulted-shopper-with-encrypted-credit-card)\n  * [Create Vaulted shopper with wallet](create-vaulted-shopper#section-create-vaulted-shopper-with-wallet)\n  * [Create Vaulted Shopper with Hosted Payment Fields token](create-vaulted-shopper#section-create-vaulted-shopper-with-hosted-payment-fields-token)\n  * [Create Vaulted Shopper with ACH/ECP info](create-vaulted-shopper#section-create-vaulted-shopper-with-ach-ecp-info)\n  * [Create Vaulted Shopper with credit card and soft descriptor](#section-create-vaulted-shopper-with-credit-card-and-soft-descriptor)\n  * [Create Vaulted Shopper with SEPA Direct Debit](#section-create-vaulted-shopper-with-sepa-direct-debit)\n\n###Basic Create Vaulted Shopper\nThis example shows a basic Create Vaulted Shopper request that saves the shopper in BlueSnap without any information about the shopper's payment methods.\n\n###Create Vaulted Shopper with credit card\nTo save credit card information for the shopper, you'll need to include the `credit-card-info` property within the `payment-sources` resource in your request. See [credit-card-info](doc:credit-card-info). Note that you must meet specific [PCI compliance](/v1.0/docs/pci-compliance) requirements in order to send unencrypted card details.\n\nAbove is an example of a request with an unencrypted credit card number.\n\n###Create Vaulted Shopper with credit card and billing info\nOptionally, you can include the shopper's billing info in the `credit-card-info` property within the `payment-sources` resource in your request. See [credit-card-info](doc:credit-card-info). This can help improve the experience for returning shoppers, because you can save time by pre-populating the checkout form with their billing details.\n\nAbove is an example of a request with credit card details along with billing info.\n\n###Create Vaulted Shopper with credit card, billing info and fraud info\nOptionally, 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.\n\nAbove is an example of a request with that includes fraud info such as the shopper's IP address and shipping address.\n\n###Create Vaulted Shopper with encrypted credit card\nYour [PCI compliance](/v1.0/docs/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 the`encrypted-card-number` and `encrypted-security-code` properties within the [credit-card-info](doc:credit-card-info) resource in your request.\n\nAbove is an example of a request with an encrypted credit card number.\n\n###Create Vaulted Shopper with encrypted credit card\nYour [PCI compliance](/v1.0/docs/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 the`encrypted-card-number` and `encrypted-security-code` properties within the [credit-card-info](doc:credit-card-info) resource in your request.\n\nAbove is an example of a request with an encrypted credit card number.\n\n###Create Vaulted Shopper with wallet\nTo create a shopper with wallet details, including the payment info and billing and shipping info, you will simply include the `wallet-id` in the request. No other elements are required.\n\nFor details, see:\n  * [MasterPass Guide](/v1.0/docs/masterpass)\n  * [Visa Checkout Guide](/v1.0/docs/visa-checkout)\n\nAbove is an example of a request with a wallet ID.\n\n###Create Vaulted Shopper with Hosted Payment Fields token\nIf you are using BlueSnap's [Hosted Payment Fields](/v4.0/docs/hosted-payment-fields), you can save the shopper's payment information from the Hosted Payment Fields by including the token within the `pf-token` property in your request.\n\nAbove is an example of a request with the Hosted Payment Fields token.\n\n###Create Vaulted Shopper with ACH/ECP info\nTo save ACH/ECP account info for a shopper, include the [ecp-info](doc:ecp-info) element in your request. Only one ACH/ECP account can be saved per shopper.\n\n###Create Vaulted Shopper with credit card and soft descriptor\nThe 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. \n\n###Create Vaulted Shopper with SEPA Direct Debit \nThe above example shows a Create Vaulted Shopper request with bank account details for the [SEPA Direct Debit](/v1.0/docs/sepa-direct-debit) payment method. Include the shopper's bank account details within `payment-sources` > `sepa-direct-debit-info` > `sepa-direct-debit`. The shopper may have more than one saved bank accounts with the 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, enter the XML portion of the request below 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":"create-vaulted-shopper","type":"post","title":"Create Vaulted Shopper"}

postCreate Vaulted Shopper


Definition

{{ api_url }}{{ page_api_url }}

Documentation

The Create Vaulted Shopper request enables you to store a shopper's details (including payment info) securely in BlueSnap. BlueSnap will provide a token (vaulted-shopper-id) for that saved shopper.

You can then use the vaulted-shopper-id in order to complete payment transactions, improve the checkout experience for a returning shopper, and update the shopper's payment details. For an example of using the vaulted-shopper-id for a returning shopper, see Returning shopper tutorial.

  • Each vaulted shopper can have multiple credit cards.
  • 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

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
      merchant-shopper-id string    optional
      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     required for Corporate ECP accounts
      shopper-currency string    optional
      payment-sources container    optional (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.
The vaulted-shopper-id appears in the response body, as well as in the URL in the location header. In the example below, the vaulted-shopper-id is 20848977.

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


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-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>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-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-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 POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-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-number>4263982640269299</card-number>
            <security-code>837</security-code>
            <expiration-month>02</expiration-month>
            <expiration-year>2018</expiration-year>
         </credit-card>
         <billing-contact-info>
            <first-name>billingFirstName</first-name>
            <last-name>billingLastName</last-name>
            <country>US</country>
            <state>MA</state>
            <address1>10 Main St</address1>
            <address2>Apt 1</address2>
            <email>email@example.com</email>
            <zip>01752</zip>
         </billing-contact-info>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-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-number>4263982640269299</card-number>
            <security-code>837</security-code>
            <expiration-month>02</expiration-month>
            <expiration-year>2018</expiration-year>
         </credit-card>
         <billing-contact-info>
            <first-name>billingFirstName</first-name>
            <last-name>billingLastName</last-name>
            <country>US</country>
            <state>MA</state>
            <address1>10 Main St</address1>
            <address2>Apt 1</address2>
            <email>email@example.com</email>
            <zip>01752</zip>
         </billing-contact-info>
      </credit-card-info>
   </payment-sources>
   <transaction-fraud-info>
      <fraud-session-id>1234</fraud-session-id>
      <shopper-ip-address>123.12.134.1</shopper-ip-address>
      <company>company</company>
      <shipping-contact-info>
         <last-name>shippingFirstName</last-name>
         <first-name>shippingLastName</first-name>
         <country>US</country>
         <state>AL</state>
         <city>shippingCity</city>
         <address1>shippingAddress1</address1>
         <address2>shippingAddress2</address2>
         <zip>shippingZip</zip>
      </shipping-contact-info>
   </transaction-fraud-info>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-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>
            <encrypted-card-number>$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=</encrypted-card-number>
           <encrypted-security-code>$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=</encrypted-security-code>
          <card-type>VISA</card-type>
          <expiration-month>07</expiration-month>
          <expiration-year>2016</expiration-year>
        </credit-card>
     </credit-card-info>
   </payment-sources>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
   <wallet-id>21</wallet-id>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <payment-sources>
      <credit-card-info>
            <pf-token>9688f4f6945f615b1ab6954ceb5dbf67f63d6b41fa27dbff6ac342cff9bf50fc_</pf-token>
      </credit-card-info>
   </payment-sources>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>FirstName</first-name>
   <last-name>LastName</last-name>
   <country>us</country>
   <zip>12345</zip>
   <phone>1234567890</phone>
   <payment-sources>
      <ecp-info>
         <ecp>
          <account-number>4099999992</account-number>
          <routing-number>011075150</routing-number>
          <account-type>CONSUMER_CHECKING</account-type>
         </ecp>
      </ecp-info>
   </payment-sources>
</vaulted-shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-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 POST https://sandbox.bluesnap.com/services/2/vaulted-shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
   <first-name>Jane</first-name>
   <last-name>Shopper</last-name>
   <zip>12345</zip>
   <phone>1234567890</phone>
   <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
Location: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/20848977

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vaulted-shopper xmlns="http://ws.plimus.com">
  <vaulted-shopper-id>20848977</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>
      <fraud-result-info>
        <device-data-collector>N</device-data-collector>
      </fraud-result-info>
    </credit-card-info>
  </payment-sources>
</vaulted-shopper>
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/vaulted-shoppers/19549020

Back to Top


Example Descriptions

For details about the above examples, see:

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 credit-card-info property within the payment-sources resource in your request. See credit-card-info. 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 credit-card-info property within the payment-sources resource in your request. See credit-card-info. 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 theencrypted-card-number and encrypted-security-code properties within the credit-card-info resource in your request.

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

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 theencrypted-card-number and encrypted-security-code properties within the credit-card-info resource 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 wallet-id 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 pf-token property in your request.

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

Create Vaulted Shopper with ACH/ECP info

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

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 payment-sources > sepa-direct-debit-info > sepa-direct-debit. The shopper may have more than one saved bank accounts with the SEPA Direct Debit payment method.



Back to Top


API Explorer (API version 2.0)

To test out a call, enter the XML portion of the request below 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


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