{"_id":"59e8f602aa561e00241c44ee","category":{"_id":"59e8f600aa561e00241c44ae","version":"59e8f600aa561e00241c44aa","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-19T18:31:30.299Z","from_sync":false,"order":3,"slug":"vaulted-shopper-service","title":"Shoppers"},"parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","version":{"_id":"59e8f600aa561e00241c44aa","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-10-19T18:59:12.596Z","releaseDate":"2017-10-19T18:59:12.596Z","categories":["59e8f600aa561e00241c44ab","59e8f600aa561e00241c44ac","59e8f600aa561e00241c44ad","59e8f600aa561e00241c44ae","59e8f600aa561e00241c44af","59e8f600aa561e00241c44b0","59e8f600aa561e00241c44b1","59e8f600aa561e00241c44b2","59e8f600aa561e00241c44b3","59e8f600aa561e00241c44b4","59e8f600aa561e00241c44b5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.23 Release","version_clean":"8976.0.0-Extended","version":"8976-Extended"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-01T14:49:50.166Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"code":"","language":"text"}]},"settings":"","auth":"optional","params":[],"url":""},"isReference":true,"order":11,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/shoppers</span>\n\n<hr>\n\n##Documentation\nThe Create Shopper request enables you to store a shopper's details (including payment info) securely in BlueSnap. BlueSnap will provide a token (`shopper-id`) for that saved shopper.\n\nYou can then use the `shopper-id` in order to complete payment transactions, improve the checkout experience for a returning shopper, and update the shopper's payment details.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"* Each vaulted shopper can have multiple credit cards.\\n\\n* To create a shopper with MasterPass or Visa Checkout wallet details, including the payment info and billing and shipping info, you will include the `wallet-id` 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###Request Content\n`shopper` &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [shopper](doc:shopper)):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`web-info` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [web-info](doc:web-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraud-info` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [fraud-info](doc:fraud-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shopper-info` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [shopper-info](doc:shopper-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`wallet-id` *integer* &nbsp;&nbsp;&nbsp;optional&nbsp;&nbsp;&nbsp;applicable for MasterPass and Visa Checkout \n\n###Response Details\nIf successful, the response HTTP status code is 201 Created.\nThe `shopper-id` appears in the URL in the location header. \nThere is no content in the response body.\nFor details about possible errors, see: [General Errors](doc:general-errors), [Shopper Errors](doc:shopper-errors), [Hosted Payment Field Errors](/v4.0/docs/hosted-payment-field-errors), and [Wallet Errors](/v4.0/docs/wallet-errors).\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/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <shopper-info>\\n    <shopper-currency>USD</shopper-currency>\\n    <store-id>4677</store-id>\\n    <locale>en</locale>\\n    <shopper-contact-info>\\n      <title>Mr.</title>\\n      <first-name>John</first-name>\\n      <last-name>Doe</last-name>\\n      <email>jdoe:::at:::johndoeandsons.com</email>\\n      <company-name>JohnDoeAndSons</company-name>\\n      <address1>138 Market St</address1>\\n      <city>San Francisco</city>\\n      <zip>75654</zip>\\n      <state>CA</state>\\n      <country>US</country>\\n      <phone>14135556789</phone>\\n      <fax>14135556788</fax>\\n    </shopper-contact-info>\\n  </shopper-info>\\n</shopper>\",\n      \"language\": \"xml\",\n      \"name\": \"Create Shopper Request: without payment info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <shopper-info>\\n    <seller-shopper-id>1234abcd</seller-shopper-id>\\n    <shopper-currency>USD</shopper-currency>\\n    <store-id>4677</store-id>\\n    <locale>en</locale>\\n    <shopper-contact-info>\\n      <title>Mr.</title>\\n      <first-name>John</first-name>\\n      <last-name>Doe</last-name>\\n      <email>jdoe@johndoeandsons.com</email>\\n      <company-name>JohnDoeAndSons</company-name>\\n      <address1>138 Market St</address1>\\n      <city>San Francisco</city>\\n      <zip>75654</zip>\\n      <state>CA</state>\\n      <country>US</country>\\n      <phone>14135556789</phone>\\n      <fax>14135556788</fax>\\n    </shopper-contact-info>\\n  </shopper-info>\\n</shopper>'\",\n      \"language\": \"xml\",\n      \"name\": \"with seller shopper ID\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <shopper-info>\\n    <shopper-currency>USD</shopper-currency>\\n    <store-id>4677</store-id>\\n    <locale>en</locale>\\n    <soft-descriptor>MYCOMPANY</soft-descriptor>\\n    <shopper-contact-info>\\n      <title>Mr.</title>\\n      <first-name>John</first-name>\\n      <last-name>Doe</last-name>\\n      <email>jdoe@johndoeandsons.com</email>\\n      <company-name>JohnDoeAndSons</company-name>\\n      <address1>138 Market St</address1>\\n      <city>San Francisco</city>\\n      <zip>75654</zip>\\n      <state>CA</state>\\n      <country>US</country>\\n      <phone>14135556789</phone>\\n      <fax>14135556788</fax>\\n    </shopper-contact-info>\\n    <payment-info>\\n      <credit-cards-info>\\n        <credit-card-info>\\n          <billing-contact-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <address1>138 Market St</address1>\\n            <city>San Francisco</city>\\n            <zip>75654</zip>\\n            <state>CA</state>\\n            <country>US</country>\\n          </billing-contact-info>\\n          <credit-card>\\n            <card-number>4111 1111 1111 1111</card-number>\\n            <security-code>123</security-code>\\n            <card-type>VISA</card-type>\\n            <expiration-month>09</expiration-month>\\n            <expiration-year>2019</expiration-year>\\n          </credit-card>\\n        </credit-card-info>\\n        <credit-card-info>\\n          <billing-contact-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <address1>138 Market St</address1>\\n            <city>San Francisco</city>\\n            <zip>75654</zip>\\n            <state>CA</state>\\n            <country>US</country>\\n          </billing-contact-info>\\n          <credit-card>\\n            <card-number>5555 5555 5555 4444</card-number>\\n            <security-code>321</security-code>\\n            <card-type>MASTERCARD</card-type>\\n            <expiration-month>09</expiration-month>\\n            <expiration-year>2019</expiration-year>\\n          </credit-card>\\n        </credit-card-info>\\n        <credit-card-info>\\n          <billing-contact-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <address1>138 Market St</address1>\\n            <city>San Francisco</city>\\n            <zip>75654</zip>\\n            <state>CA</state>\\n            <country>US</country>\\n          </billing-contact-info>\\n          <credit-card>\\n            <card-number>3782 822463 10005</card-number>\\n            <security-code>1122</security-code>\\n            <card-type>AMEX</card-type>\\n            <expiration-month>09</expiration-month>\\n            <expiration-year>2019</expiration-year>\\n          </credit-card>\\n        </credit-card-info>\\n      </credit-cards-info>\\n    </payment-info>\\n  </shopper-info>\\n</shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with credit cards and soft descriptor\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <shopper-info>\\n    <shopper-currency>USD</shopper-currency>\\n    <store-id>4677</store-id>\\n    <locale>en</locale>\\n    <shopper-contact-info>\\n      <title>Mr.</title>\\n      <first-name>John</first-name>\\n      <last-name>Doe</last-name>\\n      <email>jdoe@johndoeandsons.com</email>\\n      <company-name>JohnDoeAndSons</company-name>\\n      <address1>138 Market St</address1>\\n      <city>San Francisco</city>\\n      <zip>75654</zip>\\n      <state>CA</state>\\n      <country>US</country>\\n      <phone>14135556789</phone>\\n      <fax>14135556788</fax>\\n    </shopper-contact-info>\\n    <payment-info>\\n      <credit-cards-info>\\n        <credit-card-info>\\n          <billing-contact-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <address1>138 Market St</address1>\\n            <city>San Francisco</city>\\n            <zip>75654</zip>\\n            <state>CA</state>\\n            <country>US</country>\\n          </billing-contact-info>\\n          <credit-card>\\n            <encrypted-card-number>$bsjs_0_0_1$b1Xz5Kt6zC8ombQuBmpYv6mGOwHaH4z39Xe/dM/M+NkFEsujEISzDHpCGG8QgxhmXMZdrss5uwtV7cSyQ2Y1aMj7tJ3F2doDI/6o3blkc1OwrlWUlN2xvpaA3yP6ls0gT4DWrA8Zc/35zTi4XCU8BXLYWlu+zEVtdxJf4ebO8nnRX99McMmykIk1EhRmxj+urXw6N/OX23BGQQBHcyQi/F6lbb9Gf16YGOQoz4Wm+C8WX/sSqDJOjEa6hYS4lR25u6FUUE2khXJodTKPh8B52uQtekEC52dHcwAVx1nOVPMspwNpaHkXZk2FTRY1OvrgOczA9imvBt0Ln69sKQEJxA==$q31cIQseKAEs1w+aLOnAE+ZVH6HLzBC1hy3/Oll57xrOWhW1EBq4SxAnGWa3UuRA$h9ixZJhFN6hfID6qJWaNivfIbq2fn2fzq0dl9FMn7Ao=</encrypted-card-number>\\n            <encrypted-security-code>$bsjs_0_0_1$EyG2KgDdQHdjpiAXo7VfcLgXk5xJwYdkyhmR7obcJxNPJ3trPl9W5d/H0CMeOhWIua1M3FT3beUYzO8vqvOyax4aI0NZAXsGJv+9uW6YrJ3Ja1Y6zycJq5A1FwAxGc9YS4RWoMTP4RHXeXi2w5RnX7EmuDaa6DMrU3iWhVmhCVgrC8SXlJnvW1oXEs29W8ySmBFqFVDCCc5PJ+NTRE65I4fGq2LCuGG7HMMHLcZAh7D9tjXve6JyQgUDMcDMRDmGbiWxmnpLlvVjK9PcdjjjN8zf5SQFYmpGB0twEZYup3vQwLyy6nCExRMv4brn5kd1elqAflbo7w+gu/2Hev6o+g==$9qjEMr78+G1b4TGTTW+JLd5YybaMldD1DIXLUsd0c/U=$v3UYM7sPxLx8rpxspoirMdPhcavOBdbmn26WJ19En2Q=</encrypted-security-code>\\n            <card-type>VISA</card-type>\\n            <expiration-month>09</expiration-month>\\n            <expiration-year>2019</expiration-year>\\n          </credit-card>\\n        </credit-card-info>\\n      </credit-cards-info>\\n    </payment-info>\\n  </shopper-info>\\n</shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with encrypted credit card\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <fraud-info>\\n    <fraud-session-id>1234567890</fraud-session-id>\\n  </fraud-info>\\n  <shopper-info>\\n    <shopper-contact-info>\\n      <title>Mr</title>\\n      <first-name>Shopper first name</first-name>\\n      <last-name>Shopper last name</last-name>\\n      <email>shevie-test@gmail.com</email>\\n      <company-name>JS Company</company-name>\\n      <address1>123 Oxford</address1>\\n      <address2 />\\n      <city>City</city>\\n      <state>NY</state>\\n      <zip>54321</zip>\\n      <country>us</country>\\n      <phone>1800808080</phone>\\n      <fax>1800808080</fax>\\n    </shopper-contact-info>\\n    <shipping-contact-info>\\n      <first-name>Shipping first name</first-name>\\n      <last-name>Shipping last name</last-name>\\n      <address1>123 Shipping</address1>\\n      <address2 />\\n      <city>City</city>\\n      <state>NY</state>\\n      <zip>54321</zip>\\n      <country>US</country>\\n    </shipping-contact-info>\\n    <payment-info>\\n      <credit-cards-info>\\n        <credit-card-info>\\n          <billing-contact-info>\\n            <first-name>Billing first name</first-name>\\n            <last-name>Billing last name</last-name>\\n            <address1>123 Billing</address1>\\n            <address2 />\\n            <city>City</city>\\n            <state>NY</state>\\n            <zip>54321</zip>\\n            <country>US</country>\\n          </billing-contact-info>\\n          <credit-card>\\n            <card-number>4111111111111111</card-number>\\n            <card-type>VISA</card-type>\\n            <expiration-month>12</expiration-month>\\n            <expiration-year>2019</expiration-year>\\n            <security-code>111</security-code>\\n          </credit-card>\\n        </credit-card-info>\\n      </credit-cards-info>\\n    </payment-info>\\n    <store-id>10540</store-id>\\n    <vat-code>AT-U49361408</vat-code>\\n    <shopper-currency>USD</shopper-currency>\\n    <locale>en</locale>\\n  </shopper-info>\\n</shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with fraud info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n   <web-info>\\n     <ip>62.219.121.253</ip>\\n     <remote-host>www.merchant.com</remote-host>\\n     <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n   </web-info>\\n   <fraud-info>\\n      <fraud-session-id>1234567890</fraud-session-id>\\n      <enterprise-site-id>DEFAULT</enterprise-site-id>\\n      <enterprise-udfs>\\n         <udf>\\n            <udf-name>ENT_UDF1</udf-name>\\n            <udf-value>aaa</udf-value>\\n         </udf>\\n         <udf>\\n            <udf-name>ENT_UDF2</udf-name>\\n            <udf-value>bbb</udf-value>\\n         </udf>\\n      </enterprise-udfs>\\n   </fraud-info>\\n   <shopper-info>\\n      <shopper-contact-info>\\n         <title>Mr</title>\\n         <first-name>Shopper first name</first-name>\\n         <last-name>Shopper last name</last-name>\\n         <email>shevie-test@gmail.com</email>\\n         <company-name>JS Company</company-name>\\n         <address1>123 Oxford</address1>\\n         <address2 />\\n         <city>City</city>\\n         <state>NY</state>\\n         <zip>54321</zip>\\n         <country>US</country>\\n         <phone>1800808080</phone>\\n         <fax>1800808080</fax>\\n      </shopper-contact-info>\\n      <shipping-contact-info>\\n         <first-name>Shipping first name</first-name>\\n         <last-name>Shipping last name</last-name>\\n         <address1>123 Shipping</address1>\\n         <address2 />\\n         <city>City</city>\\n         <state>NY</state>\\n         <zip>54321</zip>\\n         <country>US</country>\\n      </shipping-contact-info>\\n      <payment-info>\\n         <credit-cards-info>\\n            <credit-card-info>\\n               <billing-contact-info>\\n                  <first-name>Billing first name</first-name>\\n                  <last-name>Billing last name</last-name>\\n                  <address1>123 Billing</address1>\\n                  <address2 />\\n                  <city>City</city>\\n                  <state>NY</state>\\n                  <zip>54321</zip>\\n                  <country>US</country>\\n               </billing-contact-info>\\n               <credit-card>\\n                  <card-number>4111111111111111</card-number>\\n                  <card-type>VISA</card-type>\\n                  <expiration-month>12</expiration-month>\\n                  <expiration-year>2019</expiration-year>\\n                  <security-code>111</security-code>\\n               </credit-card>\\n            </credit-card-info>\\n         </credit-cards-info>\\n      </payment-info>\\n      <store-id>10540</store-id>\\n      <vat-code>AT-U49361408</vat-code>\\n      <shopper-currency>USD</shopper-currency>\\n      <locale>en</locale>\\n   </shopper-info>\\n</shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with enterprise fraud info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <shopper-info>\\n    <shopper-currency>USD</shopper-currency>\\n    <store-id>11580</store-id>\\n    <locale>en</locale>\\n  </shopper-info>\\n  <wallet-id>121</wallet-id>\\n</shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with wallet ID\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n  </web-info>\\n  <shopper-info>\\n    <shopper-currency>USD</shopper-currency>\\n    <store-id>4677</store-id>\\n    <locale>en</locale>\\n    <shopper-contact-info>\\n      <title>Mr.</title>\\n      <first-name>John</first-name>\\n      <last-name>Doe</last-name>\\n      <email>jdoe@johndoeandsons.com</email>\\n      <company-name>JohnDoeAndSons</company-name>\\n      <address1>138 Market St</address1>\\n      <city>San Francisco</city>\\n      <zip>75654</zip>\\n      <state>CA</state>\\n      <country>US</country>\\n      <phone>14135556789</phone>\\n      <fax>14135556788</fax>\\n    </shopper-contact-info>\\n    <payment-info>\\n      <credit-cards-info>\\n        <credit-card-info>\\n          <billing-contact-info>\\n            <first-name>John</first-name>\\n            <last-name>Doe</last-name>\\n            <address1>138 Market St</address1>\\n            <city>San Francisco</city>\\n            <zip>75654</zip>\\n            <state>CA</state>\\n            <country>US</country>\\n          </billing-contact-info>\\n          <pf-token>c7c69ff853ab784ef35a0c78ffec08e78cf1d1b5b4bb9e2644c2bcc73f3f818f_1</pf-token>\\n        </credit-card-info>\\n      </credit-cards-info>\\n    </payment-info>\\n  </shopper-info>\\n</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/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/4.0</user-agent>\\n    <accept-language>en-us</accept-language>\\n  </web-info>\\n  <fraud-info>\\n    <fraud-session-id>442435ApiAutomation591329946164</fraud-session-id>\\n  </fraud-info>\\n  <shopper-info>\\n    <shopper-contact-info>\\n      <title>Mr</title>\\n      <first-name>ECP Shopper first name</first-name>\\n      <last-name>ECP Shopper last name</last-name>\\n      <email>email@email.com</email>\\n      <company-name>ECP Company</company-name>\\n      <address1>123 Oxford</address1>\\n      <address2/>\\n      <city>London</city>\\n      <state>ny</state>\\n      <zip>54321</zip>\\n      <country>us</country>\\n      <phone>1800808080</phone>\\n      <fax>1800808080</fax>\\n    </shopper-contact-info>\\n    <shipping-contact-info>\\n      <first-name>ECP Shipping first name</first-name>\\n      <last-name>ECP Shipping last name</last-name>\\n      <address1>123 Oxford</address1>\\n      <address2/>\\n      <city>New York</city>\\n      <state>ny</state>\\n      <zip>54321</zip>\\n      <country>us</country>\\n    </shipping-contact-info>\\n    <payment-info>\\n      <ecps-info>\\n        <ecp-info>\\n          <billing-contact-info>\\n            <first-name>ECP Billing first name</first-name>\\n            <last-name>ECP Billing last name</last-name>\\n            <address1>123 Oxford</address1>\\n            <city>New York</city>\\n            <zip>54321</zip>\\n            <state>ny</state>\\n            <country>us</country>\\n          </billing-contact-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      </ecps-info>\\n    </payment-info>\\n    <store-id>12060</store-id>\\n    <shopper-currency>USD</shopper-currency>\\n    <locale>en</locale>\\n  </shopper-info>\\n</shopper>'\\n\",\n      \"language\": \"curl\",\n      \"name\": \"with ACH/ECP info\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopper xmlns=\\\"http://ws.plimus.com\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n  <web-info>\\n    <ip>62.219.121.253</ip>\\n    <remote-host>www.merchant.com</remote-host>\\n    <user-agent>Mozilla/4.0</user-agent>\\n    <accept-language>en-us</accept-language>\\n  </web-info>\\n  <shopper-info>\\n    <shopper-contact-info>\\n      <title>Mr</title>\\n      <first-name>SEPA Shopper first name</first-name>\\n      <last-name>SEPA Shopper last name</last-name>\\n      <email>email@email.com</email>\\n      <company-name>SEPA Company</company-name>\\n      <address1>123 Oxford</address1>\\n      <address2/>\\n      <city>London</city>\\n      <state>ny</state>\\n      <zip>54321</zip>\\n      <country>us</country>\\n      <phone>1800808080</phone>\\n      <fax>1800808080</fax>\\n    </shopper-contact-info>\\n    <shipping-contact-info>\\n      <first-name>SEPA Shipping first name</first-name>\\n      <last-name>SEPA Shipping last name</last-name>\\n      <address1>123 Oxford</address1>\\n      <address2/>\\n      <city>New York</city>\\n      <zip>54321</zip>\\n      <country>fr</country>\\n    </shipping-contact-info>\\n    <payment-info>\\n      <sepa-direct-debits-info>\\n        <sepa-direct-debit-info>\\n          <billing-contact-info>\\n            <first-name>SEPA Billing first name</first-name>\\n            <last-name>SEPA Billing last name</last-name>\\n            <address1>123 Oxford</address1>\\n            <city>New York</city>\\n            <zip>54321</zip>\\n            <country>fr</country>\\n          </billing-contact-info>\\n          <sepa-direct-debit>\\n            <iban>DE09100100101234567893</iban>\\n          </sepa-direct-debit>\\n        </sepa-direct-debit-info>\\n      </sepa-direct-debits-info>\\n    </payment-info>\\n    <store-id>1900</store-id>\\n    <shopper-currency>USD</shopper-currency>\\n    <locale>en</locale>\\n  </shopper-info>\\n</shopper>'\",\n      \"language\": \"curl\",\n      \"name\": \"with SEPA Direct Debit info\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 201 Created\\nLocation: https://sandbox.bluesnap.com/services/2/shoppers/19575974\",\n      \"language\": \"http\",\n      \"name\": \"Create Shopper Response\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##Example Descriptions\n\n###Create Shopper: without payment info\nThe example above shows a basic Create Shopper request that saves the shopper in BlueSnap without any information about the shopper's payment methods.\n\n###Create Shopper: with seller shopper ID\nThe example above shows how to assign your own unique ID for the shopper by sending it in the `seller-shopper-id` field in the Create Shopper request.\n\n###Create Shopper: with credit cards\nThe example above shows how to save credit cards (unencrypted) for a shopper by including one or more `credit-card-info` properties within the `payment-info` 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\n###Create Shopper: with encrypted credit card\nThe example above shows a request with an encrypted credit card number. Your [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\n###Create Shopper: with fraud info / enterprise fraud info\nTo send additional information for fraud check purposes (such as the shopper's unique device fingerprint), you'll need to include the `fraud-info` property in your request. See [fraud-info](doc:fraud-info).\n\nAbove are two examples: one with standard fraud info, and one with enterprise fraud info. Enterprise fraud info is supported only for merchants who have signed up for the Enterprise-level fraud service from BlueSnap. See [Fraud prevention](/v1.0/docs/fraud-prevention).\n\n###Create Shopper: with wallet ID\nTo create a shopper with wallet details, including the payment info and billing and shipping info, simply include the `wallet-id` in the request.\n\nFor details, see:\n  * [MasterPass Guide](/v1.0/docs/masterpass)\n  * [Visa Checkout Guide](/v1.0/docs/visa-checkout)\n\n###Create 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. Above is an example of a request with the Hosted Payment Fields token.\n\n###Create Shopper: with ACH/ECP info\nTo save ACH/ECP account info for a shopper, include the [ecps-info](doc:ecps-info) element in your request.\n\n###Create Shopper: with SEPA Direct Debit info\nTo save banking information for the SEPA Direct Debit payment method, include the `sepa-direct-debits-info` element in your request. \n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>","excerpt":"","slug":"create-shopper","type":"post","title":"Create Shopper"}

postCreate Shopper


Definition

https://sandbox.bluesnap.com/services/2/shoppers


Documentation

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

You can then use the shopper-id in order to complete payment transactions, improve the checkout experience for a returning shopper, and update the shopper's payment details.

  • Each vaulted shopper can have multiple credit cards.

  • To create a shopper with MasterPass or Visa Checkout wallet details, including the payment info and billing and shipping info, you will include the wallet-id in the request. For details, see:

Request Content

shopper    required, contains the following properties (see shopper):
      web-info container    required (see web-info)
      fraud-info container    required (see fraud-info)
      shopper-info container    required (see shopper-info)
      wallet-id integer    optional   applicable for MasterPass and Visa Checkout

Response Details

If successful, the response HTTP status code is 201 Created.
The shopper-id appears in the URL in the location header.
There is no content in the response body.
For details about possible errors, see: General Errors, Shopper Errors, Hosted Payment Field Errors, and Wallet Errors.


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <shopper-info>
    <shopper-currency>USD</shopper-currency>
    <store-id>4677</store-id>
    <locale>en</locale>
    <shopper-contact-info>
      <title>Mr.</title>
      <first-name>John</first-name>
      <last-name>Doe</last-name>
      <email>jdoe@johndoeandsons.com</email>
      <company-name>JohnDoeAndSons</company-name>
      <address1>138 Market St</address1>
      <city>San Francisco</city>
      <zip>75654</zip>
      <state>CA</state>
      <country>US</country>
      <phone>14135556789</phone>
      <fax>14135556788</fax>
    </shopper-contact-info>
  </shopper-info>
</shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <shopper-info>
    <seller-shopper-id>1234abcd</seller-shopper-id>
    <shopper-currency>USD</shopper-currency>
    <store-id>4677</store-id>
    <locale>en</locale>
    <shopper-contact-info>
      <title>Mr.</title>
      <first-name>John</first-name>
      <last-name>Doe</last-name>
      <email>jdoe@johndoeandsons.com</email>
      <company-name>JohnDoeAndSons</company-name>
      <address1>138 Market St</address1>
      <city>San Francisco</city>
      <zip>75654</zip>
      <state>CA</state>
      <country>US</country>
      <phone>14135556789</phone>
      <fax>14135556788</fax>
    </shopper-contact-info>
  </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <shopper-info>
    <shopper-currency>USD</shopper-currency>
    <store-id>4677</store-id>
    <locale>en</locale>
    <soft-descriptor>MYCOMPANY</soft-descriptor>
    <shopper-contact-info>
      <title>Mr.</title>
      <first-name>John</first-name>
      <last-name>Doe</last-name>
      <email>jdoe@johndoeandsons.com</email>
      <company-name>JohnDoeAndSons</company-name>
      <address1>138 Market St</address1>
      <city>San Francisco</city>
      <zip>75654</zip>
      <state>CA</state>
      <country>US</country>
      <phone>14135556789</phone>
      <fax>14135556788</fax>
    </shopper-contact-info>
    <payment-info>
      <credit-cards-info>
        <credit-card-info>
          <billing-contact-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <address1>138 Market St</address1>
            <city>San Francisco</city>
            <zip>75654</zip>
            <state>CA</state>
            <country>US</country>
          </billing-contact-info>
          <credit-card>
            <card-number>4111 1111 1111 1111</card-number>
            <security-code>123</security-code>
            <card-type>VISA</card-type>
            <expiration-month>09</expiration-month>
            <expiration-year>2019</expiration-year>
          </credit-card>
        </credit-card-info>
        <credit-card-info>
          <billing-contact-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <address1>138 Market St</address1>
            <city>San Francisco</city>
            <zip>75654</zip>
            <state>CA</state>
            <country>US</country>
          </billing-contact-info>
          <credit-card>
            <card-number>5555 5555 5555 4444</card-number>
            <security-code>321</security-code>
            <card-type>MASTERCARD</card-type>
            <expiration-month>09</expiration-month>
            <expiration-year>2019</expiration-year>
          </credit-card>
        </credit-card-info>
        <credit-card-info>
          <billing-contact-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <address1>138 Market St</address1>
            <city>San Francisco</city>
            <zip>75654</zip>
            <state>CA</state>
            <country>US</country>
          </billing-contact-info>
          <credit-card>
            <card-number>3782 822463 10005</card-number>
            <security-code>1122</security-code>
            <card-type>AMEX</card-type>
            <expiration-month>09</expiration-month>
            <expiration-year>2019</expiration-year>
          </credit-card>
        </credit-card-info>
      </credit-cards-info>
    </payment-info>
  </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <shopper-info>
    <shopper-currency>USD</shopper-currency>
    <store-id>4677</store-id>
    <locale>en</locale>
    <shopper-contact-info>
      <title>Mr.</title>
      <first-name>John</first-name>
      <last-name>Doe</last-name>
      <email>jdoe@johndoeandsons.com</email>
      <company-name>JohnDoeAndSons</company-name>
      <address1>138 Market St</address1>
      <city>San Francisco</city>
      <zip>75654</zip>
      <state>CA</state>
      <country>US</country>
      <phone>14135556789</phone>
      <fax>14135556788</fax>
    </shopper-contact-info>
    <payment-info>
      <credit-cards-info>
        <credit-card-info>
          <billing-contact-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <address1>138 Market St</address1>
            <city>San Francisco</city>
            <zip>75654</zip>
            <state>CA</state>
            <country>US</country>
          </billing-contact-info>
          <credit-card>
            <encrypted-card-number>$bsjs_0_0_1$b1Xz5Kt6zC8ombQuBmpYv6mGOwHaH4z39Xe/dM/M+NkFEsujEISzDHpCGG8QgxhmXMZdrss5uwtV7cSyQ2Y1aMj7tJ3F2doDI/6o3blkc1OwrlWUlN2xvpaA3yP6ls0gT4DWrA8Zc/35zTi4XCU8BXLYWlu+zEVtdxJf4ebO8nnRX99McMmykIk1EhRmxj+urXw6N/OX23BGQQBHcyQi/F6lbb9Gf16YGOQoz4Wm+C8WX/sSqDJOjEa6hYS4lR25u6FUUE2khXJodTKPh8B52uQtekEC52dHcwAVx1nOVPMspwNpaHkXZk2FTRY1OvrgOczA9imvBt0Ln69sKQEJxA==$q31cIQseKAEs1w+aLOnAE+ZVH6HLzBC1hy3/Oll57xrOWhW1EBq4SxAnGWa3UuRA$h9ixZJhFN6hfID6qJWaNivfIbq2fn2fzq0dl9FMn7Ao=</encrypted-card-number>
            <encrypted-security-code>$bsjs_0_0_1$EyG2KgDdQHdjpiAXo7VfcLgXk5xJwYdkyhmR7obcJxNPJ3trPl9W5d/H0CMeOhWIua1M3FT3beUYzO8vqvOyax4aI0NZAXsGJv+9uW6YrJ3Ja1Y6zycJq5A1FwAxGc9YS4RWoMTP4RHXeXi2w5RnX7EmuDaa6DMrU3iWhVmhCVgrC8SXlJnvW1oXEs29W8ySmBFqFVDCCc5PJ+NTRE65I4fGq2LCuGG7HMMHLcZAh7D9tjXve6JyQgUDMcDMRDmGbiWxmnpLlvVjK9PcdjjjN8zf5SQFYmpGB0twEZYup3vQwLyy6nCExRMv4brn5kd1elqAflbo7w+gu/2Hev6o+g==$9qjEMr78+G1b4TGTTW+JLd5YybaMldD1DIXLUsd0c/U=$v3UYM7sPxLx8rpxspoirMdPhcavOBdbmn26WJ19En2Q=</encrypted-security-code>
            <card-type>VISA</card-type>
            <expiration-month>09</expiration-month>
            <expiration-year>2019</expiration-year>
          </credit-card>
        </credit-card-info>
      </credit-cards-info>
    </payment-info>
  </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <fraud-info>
    <fraud-session-id>1234567890</fraud-session-id>
  </fraud-info>
  <shopper-info>
    <shopper-contact-info>
      <title>Mr</title>
      <first-name>Shopper first name</first-name>
      <last-name>Shopper last name</last-name>
      <email>shevie-test@gmail.com</email>
      <company-name>JS Company</company-name>
      <address1>123 Oxford</address1>
      <address2 />
      <city>City</city>
      <state>NY</state>
      <zip>54321</zip>
      <country>us</country>
      <phone>1800808080</phone>
      <fax>1800808080</fax>
    </shopper-contact-info>
    <shipping-contact-info>
      <first-name>Shipping first name</first-name>
      <last-name>Shipping last name</last-name>
      <address1>123 Shipping</address1>
      <address2 />
      <city>City</city>
      <state>NY</state>
      <zip>54321</zip>
      <country>US</country>
    </shipping-contact-info>
    <payment-info>
      <credit-cards-info>
        <credit-card-info>
          <billing-contact-info>
            <first-name>Billing first name</first-name>
            <last-name>Billing last name</last-name>
            <address1>123 Billing</address1>
            <address2 />
            <city>City</city>
            <state>NY</state>
            <zip>54321</zip>
            <country>US</country>
          </billing-contact-info>
          <credit-card>
            <card-number>4111111111111111</card-number>
            <card-type>VISA</card-type>
            <expiration-month>12</expiration-month>
            <expiration-year>2019</expiration-year>
            <security-code>111</security-code>
          </credit-card>
        </credit-card-info>
      </credit-cards-info>
    </payment-info>
    <store-id>10540</store-id>
    <vat-code>AT-U49361408</vat-code>
    <shopper-currency>USD</shopper-currency>
    <locale>en</locale>
  </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<shopper xmlns="http://ws.plimus.com">
   <web-info>
     <ip>62.219.121.253</ip>
     <remote-host>www.merchant.com</remote-host>
     <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
   </web-info>
   <fraud-info>
      <fraud-session-id>1234567890</fraud-session-id>
      <enterprise-site-id>DEFAULT</enterprise-site-id>
      <enterprise-udfs>
         <udf>
            <udf-name>ENT_UDF1</udf-name>
            <udf-value>aaa</udf-value>
         </udf>
         <udf>
            <udf-name>ENT_UDF2</udf-name>
            <udf-value>bbb</udf-value>
         </udf>
      </enterprise-udfs>
   </fraud-info>
   <shopper-info>
      <shopper-contact-info>
         <title>Mr</title>
         <first-name>Shopper first name</first-name>
         <last-name>Shopper last name</last-name>
         <email>shevie-test@gmail.com</email>
         <company-name>JS Company</company-name>
         <address1>123 Oxford</address1>
         <address2 />
         <city>City</city>
         <state>NY</state>
         <zip>54321</zip>
         <country>US</country>
         <phone>1800808080</phone>
         <fax>1800808080</fax>
      </shopper-contact-info>
      <shipping-contact-info>
         <first-name>Shipping first name</first-name>
         <last-name>Shipping last name</last-name>
         <address1>123 Shipping</address1>
         <address2 />
         <city>City</city>
         <state>NY</state>
         <zip>54321</zip>
         <country>US</country>
      </shipping-contact-info>
      <payment-info>
         <credit-cards-info>
            <credit-card-info>
               <billing-contact-info>
                  <first-name>Billing first name</first-name>
                  <last-name>Billing last name</last-name>
                  <address1>123 Billing</address1>
                  <address2 />
                  <city>City</city>
                  <state>NY</state>
                  <zip>54321</zip>
                  <country>US</country>
               </billing-contact-info>
               <credit-card>
                  <card-number>4111111111111111</card-number>
                  <card-type>VISA</card-type>
                  <expiration-month>12</expiration-month>
                  <expiration-year>2019</expiration-year>
                  <security-code>111</security-code>
               </credit-card>
            </credit-card-info>
         </credit-cards-info>
      </payment-info>
      <store-id>10540</store-id>
      <vat-code>AT-U49361408</vat-code>
      <shopper-currency>USD</shopper-currency>
      <locale>en</locale>
   </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <shopper-info>
    <shopper-currency>USD</shopper-currency>
    <store-id>11580</store-id>
    <locale>en</locale>
  </shopper-info>
  <wallet-id>121</wallet-id>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
  </web-info>
  <shopper-info>
    <shopper-currency>USD</shopper-currency>
    <store-id>4677</store-id>
    <locale>en</locale>
    <shopper-contact-info>
      <title>Mr.</title>
      <first-name>John</first-name>
      <last-name>Doe</last-name>
      <email>jdoe@johndoeandsons.com</email>
      <company-name>JohnDoeAndSons</company-name>
      <address1>138 Market St</address1>
      <city>San Francisco</city>
      <zip>75654</zip>
      <state>CA</state>
      <country>US</country>
      <phone>14135556789</phone>
      <fax>14135556788</fax>
    </shopper-contact-info>
    <payment-info>
      <credit-cards-info>
        <credit-card-info>
          <billing-contact-info>
            <first-name>John</first-name>
            <last-name>Doe</last-name>
            <address1>138 Market St</address1>
            <city>San Francisco</city>
            <zip>75654</zip>
            <state>CA</state>
            <country>US</country>
          </billing-contact-info>
          <pf-token>c7c69ff853ab784ef35a0c78ffec08e78cf1d1b5b4bb9e2644c2bcc73f3f818f_1</pf-token>
        </credit-card-info>
      </credit-cards-info>
    </payment-info>
  </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/4.0</user-agent>
    <accept-language>en-us</accept-language>
  </web-info>
  <fraud-info>
    <fraud-session-id>442435ApiAutomation591329946164</fraud-session-id>
  </fraud-info>
  <shopper-info>
    <shopper-contact-info>
      <title>Mr</title>
      <first-name>ECP Shopper first name</first-name>
      <last-name>ECP Shopper last name</last-name>
      <email>email@email.com</email>
      <company-name>ECP Company</company-name>
      <address1>123 Oxford</address1>
      <address2/>
      <city>London</city>
      <state>ny</state>
      <zip>54321</zip>
      <country>us</country>
      <phone>1800808080</phone>
      <fax>1800808080</fax>
    </shopper-contact-info>
    <shipping-contact-info>
      <first-name>ECP Shipping first name</first-name>
      <last-name>ECP Shipping last name</last-name>
      <address1>123 Oxford</address1>
      <address2/>
      <city>New York</city>
      <state>ny</state>
      <zip>54321</zip>
      <country>us</country>
    </shipping-contact-info>
    <payment-info>
      <ecps-info>
        <ecp-info>
          <billing-contact-info>
            <first-name>ECP Billing first name</first-name>
            <last-name>ECP Billing last name</last-name>
            <address1>123 Oxford</address1>
            <city>New York</city>
            <zip>54321</zip>
            <state>ny</state>
            <country>us</country>
          </billing-contact-info>
          <ecp>
            <account-number>4099999992</account-number>
            <routing-number>011075150</routing-number>
            <account-type>CONSUMER_CHECKING</account-type>
          </ecp>
        </ecp-info>
      </ecps-info>
    </payment-info>
    <store-id>12060</store-id>
    <shopper-currency>USD</shopper-currency>
    <locale>en</locale>
  </shopper-info>
</shopper>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <web-info>
    <ip>62.219.121.253</ip>
    <remote-host>www.merchant.com</remote-host>
    <user-agent>Mozilla/4.0</user-agent>
    <accept-language>en-us</accept-language>
  </web-info>
  <shopper-info>
    <shopper-contact-info>
      <title>Mr</title>
      <first-name>SEPA Shopper first name</first-name>
      <last-name>SEPA Shopper last name</last-name>
      <email>email@email.com</email>
      <company-name>SEPA Company</company-name>
      <address1>123 Oxford</address1>
      <address2/>
      <city>London</city>
      <state>ny</state>
      <zip>54321</zip>
      <country>us</country>
      <phone>1800808080</phone>
      <fax>1800808080</fax>
    </shopper-contact-info>
    <shipping-contact-info>
      <first-name>SEPA Shipping first name</first-name>
      <last-name>SEPA Shipping last name</last-name>
      <address1>123 Oxford</address1>
      <address2/>
      <city>New York</city>
      <zip>54321</zip>
      <country>fr</country>
    </shipping-contact-info>
    <payment-info>
      <sepa-direct-debits-info>
        <sepa-direct-debit-info>
          <billing-contact-info>
            <first-name>SEPA Billing first name</first-name>
            <last-name>SEPA Billing last name</last-name>
            <address1>123 Oxford</address1>
            <city>New York</city>
            <zip>54321</zip>
            <country>fr</country>
          </billing-contact-info>
          <sepa-direct-debit>
            <iban>DE09100100101234567893</iban>
          </sepa-direct-debit>
        </sepa-direct-debit-info>
      </sepa-direct-debits-info>
    </payment-info>
    <store-id>1900</store-id>
    <shopper-currency>USD</shopper-currency>
    <locale>en</locale>
  </shopper-info>
</shopper>'

Response Example

HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/shoppers/19575974


Example Descriptions

Create Shopper: without payment info

The example above shows a basic Create Shopper request that saves the shopper in BlueSnap without any information about the shopper's payment methods.

Create Shopper: with seller shopper ID

The example above shows how to assign your own unique ID for the shopper by sending it in the seller-shopper-id field in the Create Shopper request.

Create Shopper: with credit cards

The example above shows how to save credit cards (unencrypted) for a shopper by including one or more credit-card-info properties within the payment-info resource in your request. See credit-card-info. Note that you must meet specific PCI compliance requirements in order to send unencrypted card details.

Create Shopper: with encrypted credit card

The example above shows a request with an encrypted credit card number. 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.

Create Shopper: with fraud info / enterprise fraud info

To send additional information for fraud check purposes (such as the shopper's unique device fingerprint), you'll need to include the fraud-info property in your request. See fraud-info.

Above are two examples: one with standard fraud info, and one with enterprise fraud info. Enterprise fraud info is supported only for merchants who have signed up for the Enterprise-level fraud service from BlueSnap. See Fraud prevention.

Create Shopper: with wallet ID

To create a shopper with wallet details, including the payment info and billing and shipping info, simply include the wallet-id in the request.

For details, see:

Create 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 Shopper: with ACH/ECP info

To save ACH/ECP account info for a shopper, include the ecps-info element in your request.

Create Shopper: with SEPA Direct Debit info

To save banking information for the SEPA Direct Debit payment method, include the sepa-direct-debits-info element in your request.


Back to Top