Definition
https://sandbox.bluesnap.com/services/2/shoppers
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, refer to:- Header parameters need to be case-insensitive to retrieve the location or Network Transaction ID. This is to account for HTTP/1 and HTTP/2 protocols, as HTTP/2 protocol requires that header parameter names are lowercase.
Request Content
shopper
required, contains the following properties (refer to shopper):
Property | Type | Required |
---|---|---|
web-info | container | required (refer to web-info) |
fraud-info | container | required (refer to fraud-info) |
shopper-info | container | required (refer to shopper-info) |
wallet-id | integer | optional, applicable for Masterpass and Visa Checkout |
three-d-secure | container | optional (refer to three-d-secure) |
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, refer to: 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>[email protected]</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>[email protected]</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>[email protected]</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>2023</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>2023</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>2023</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>[email protected]</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>2023</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>[email protected]</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>2023</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>127.0.0.1</ip>
</web-info>
<shopper-info>
<shopper-currency>USD</shopper-currency>
<store-id>1900</store-id>
<locale>en</locale>
<shopper-contact-info>
<title>Mr.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>[email protected]</email>
<company-name>JohnDoeAndSons</company-name>
<address1>138 Market st</address1>
<city>San Francisco</city>
<zip>756543</zip>
<country>fr</country>
<phone>1413555666</phone>
<fax>1413555666789</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>756543</zip>
<state>CA</state>
<country>US</country>
</billing-contact-info>
<pf-token>98f6120da10f1d6f266d633bc24b551b3b9120e6549668bf45dd6b0f6e426d93_</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 protected]</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>
<company-name>ECP Company</company-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 protected]</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>
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>127.0.0.1</ip>
</web-info>
<transaction-order-source>MOTO</transaction-order-source>
<shopper-info>
<shopper-currency>USD</shopper-currency>
<store-id>1900</store-id>
<locale>en</locale>
<shopper-contact-info>
<title>Mr.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>[email protected]</email>
<company-name>JohnDoeAndSons</company-name>
<address1>138 Market st</address1>
<city>San Francisco</city>
<zip>756543</zip>
<country>fr</country>
<phone>1413555666</phone>
<fax>1413555666789</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>756543</zip>
<state>CA</state>
<country>US</country>
</billing-contact-info>
<pf-token>520f3d51849dd7236ac38430c92e676e1b7078811633647da707a2a9a499b7b9_</pf-token>
</credit-card-info>
</credit-cards-info>
</payment-info>
</shopper-info>
</shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers?returnrepresentation=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
<web-info>
<ip>127.0.0.1</ip>
</web-info>
<transaction-order-source>MOTO</transaction-order-source>
<shopper-info>
<shopper-currency>USD</shopper-currency>
<store-id>1900</store-id>
<locale>en</locale>
<shopper-contact-info>
<title>Mr.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>[email protected]</email>
<company-name>JohnDoeAndSons</company-name>
<address1>138 Market st</address1>
<city>San Francisco</city>
<zip>756543</zip>
<country>fr</country>
<phone>1413555666</phone>
<fax>1413555666789</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>756543</zip>
<state>CA</state>
<country>US</country>
</billing-contact-info>
<pf-token>638503418166be8fdce4d9001830134d991df066c02cb9cea7c5256645a9d709_</pf-token>
</credit-card-info>
</credit-cards-info>
</payment-info>
</shopper-info>
</shopper>
curl -v -X POST https://sandbox.bluesnap.com/services/2/shoppers?returnrepresentation=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopper xmlns="http://ws.plimus.com">
<web-info>
<ip>127.0.0.1</ip>
</web-info>
<shopper-info>
<shopper-currency>USD</shopper-currency>
<store-id>1900</store-id>
<locale>en</locale>
<shopper-contact-info>
<title>Mr.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>[email protected]</email>
<company-name>JohnDoeAndSons</company-name>
<address1>138 Market st</address1>
<city>San Francisco</city>
<zip>756543</zip>
<country>fr</country>
<phone>1413555666</phone>
<fax>1413555666789</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>756543</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>2023</expiration-year>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
</shopper-info>
<three-d-secure>
<three-d-secure-reference-id>7659</three-d-secure-reference-id>
</three-d-secure>
</shopper>'
Response Example
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/shoppers/19575974
Network-Transaction-Id: 019072316172362
HTTP 201 Created
Location: https://sandbox.bluesnap.com/services/2/shoppers/19574572
Network-Transaction-Id: 019072316172362
HTTP 201 Created
Location: https://sandbox.bluesnap.com/services/2/shoppers/19574572
Network-Transaction-Id: 019072408044865
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shopper xmlns="http://ws.plimus.com">
<shopper-info>
<shopper-id>19574630</shopper-id>
<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>756543</zip>
<country>fr</country>
<phone>1413555666</phone>
<fax>1413555666789</fax>
</shopper-contact-info>
<shipping-contact-info/>
<invoice-contacts-info>
<invoice-contact-info>
<default>true</default>
<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>756543</zip>
<country>fr</country>
<phone>1413555666</phone>
<fax>1413555666789</fax>
</invoice-contact-info>
</invoice-contacts-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>
<state>CA</state>
<zip>756543</zip>
<country>us</country>
</billing-contact-info>
<credit-card>
<card-last-four-digits>1000</card-last-four-digits>
<card-type>VISA</card-type>
<card-sub-type>CREDIT</card-sub-type>
<bin-category>CONSUMER</bin-category>
<card-regulated>N</card-regulated>
<expiration-month>01</expiration-month>
<expiration-year>2022</expiration-year>
<issuing-country-code>US</issuing-country-code>
</credit-card>
<processing-info>
<cvv-response-code>NR</cvv-response-code>
<avs-response-code-zip>N</avs-response-code-zip>
<avs-response-code-address>N</avs-response-code-address>
<avs-response-code-name>U</avs-response-code-name>
<network-transaction-id>019072408044865</network-transaction-id>
</processing-info>
</credit-card-info>
</credit-cards-info>
<ecps-info/>
<sepa-direct-debits-info/>
<balance/>
</payment-info>
<store-id>1900</store-id>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>