Create 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, refer to:

Request Content

shopper    required, contains the following properties (refer to shopper):
     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>
  <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>
    <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>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&#x40;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&#x40;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>

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. Refer to 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

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. Refer to fraud-info.

Above are two examples: one with standard fraud info, and one with Complete fraud info. Complete fraud info is supported only for merchants who have signed up for the Complete-level fraud service from BlueSnap. Refer to 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, refer to:

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.

Create Shopper: with MOTO and NTI

The transaction-order-source identifies the order as Mail Order Telephone Order. The response header includes the network-transaction-id for the transaction.

Create Shopper: with the returnrepresentation parameter

If you include the returnrepresentation parameter, the response includes the entire body of the response; the response includes the network-transaction-id in the header and in the body of the response.

Create Shopper: with 3DS

To save 3-D Secure details to the shopper, include three-d-secure in your request.


Back to Top
Language
Authorization
:
Click Try It! to start a request and see the response here!