Definition
https://sandbox.bluesnap.com/services/2/shopping-context
Documentation
The Create Shopping Context request enables you to place an order for a shopper and defer payment to a later time. This should be used for transactions with asynchronous payment methods like PayPal or wire transfers. It is also useful for cases when you want to separate your Auth and Capture phases.
Request Content
shopping-context
required, contains the following properties (refer to shopping-context):
step
string optional
web-info
container required (refer to web-info)
shopper-details
container optional (refer to shopper-details)
order-details
container required (refer to order-details)
store-card
boolean optional
Query Parameters
Optionally, you can include these query parameters in the web service URL in your request.
Parameter Name | Description | Example |
---|---|---|
returnrepresentation | Return the shopping-context resource in the response. Default is false. | returnrepresentation=true |
performfullauthorization | Perform authorization for the full amount of the the shopping-context. Otherwise, just validate the payment method on the default amount. Default is true. | performfullauthorization=false |
expirationinminutes | Configure the expiration time in minutes. | expirationinminutes=15 |
Response Details
If successful, the response HTTP status code is 201 Created.
The Location response header contains the URI of the newly created shopping-context
resource.
In most cases, there is no content in the response body.
However, the shopping-context
resource will be returned if you use the returnrepresentation
parameter, and for PayPal transactions.
For details about possible errors, refer to: General Errors, Payment & Processor Errors, Shopper Errors, Fraud Errors, Hosted Payment Field Errors, and Wallet Errors.
Examples
Request Examples
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<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>
<store-id>12700</store-id>
<vat-code />
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</shipping-contact-info>
<invoice-contacts-info>
<invoice-contact-info>
<default>true</default>
<company-name>Company</company-name>
<vat-code></vat-code>
<title>Mrs.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<address1>5 Star Drive</address1>
<address2>3rd entrance</address2>
<city>Purchase</city>
<state>NY</state>
<zip>34645</zip>
<country>us</country>
<phone>1800400500</phone>
<fax>1800400500</fax>
<email>[email protected]</email>
</invoice-contact-info>
</invoice-contacts-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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</billing-contact-info>
<credit-card>
<card-number>4111111111111111</card-number>
<expiration-month>09</expiration-month>
<expiration-year>2023</expiration-year>
<security-code>131</security-code>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
<store-id>12700</store-id>
<vat-code></vat-code>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context?returnrepresentation=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</shipping-contact-info>
<invoice-contacts-info>
<invoice-contact-info>
<default>true</default>
<company-name>BlueSnap UK</company-name>
<vat-code></vat-code>
<title>Mrs.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<address1>5 Star drive</address1>
<address2>3rd entrance</address2>
<city>Purchase</city>
<state>NY</state>
<zip>34645</zip>
<country>us</country>
<phone>1800400500</phone>
<fax>1800400500</fax>
<email>[email protected]</email>
</invoice-contact-info>
</invoice-contacts-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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</billing-contact-info>
<credit-card>
<card-number>4111111111111111</card-number>
<expiration-month>09</expiration-month>
<expiration-year>2023</expiration-year>
<security-code>131</security-code>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
<store-id>12700</store-id>
<vat-code></vat-code>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<shopper-id>19505364</shopper-id>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>20.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<shopper-id>19523762</shopper-id>
<credit-card>
<card-last-four-digits>1111</card-last-four-digits>
<card-type>Visa</card-type>
</credit-card>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2180434</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>21.75</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context 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-details>
<shopper>
<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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</shipping-contact-info>
<invoice-contacts-info>
<invoice-contact-info>
<default>true</default>
<company-name>Company</company-name>
<vat-code />
<title>Mrs.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<address1>5 star drive</address1>
<address2>3rd entrance</address2>
<city>Purchase</city>
<state>NY</state>
<zip>34645</zip>
<country>US</country>
<phone>1800400500</phone>
<fax>1800400500</fax>
<email>[email protected]</email>
</invoice-contact-info>
</invoice-contacts-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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</billing-contact-info>
<credit-card>
<card-number>4111111111111111</card-number>
<expiration-month>09</expiration-month>
<expiration-year>2023</expiration-year>
<security-code>131</security-code>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
<store-id>12700</store-id>
<vat-code />
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<seller-order-id>myorder123</seller-order-id>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<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 Oxford</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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</billing-contact-info>
<credit-card>
<card-number>4111111111111111</card-number>
<expiration-month>09</expiration-month>
<expiration-year>2023</expiration-year>
<security-code>123</security-code>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
<store-id>12700</store-id>
<vat-code>123abc123</vat-code>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2180434</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
<sku-name>new name</sku-name>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<shopper-id>19540812</shopper-id>
<credit-card>
<card-last-four-digits>1111</card-last-four-digits>
<card-type>Visa</card-type>
</credit-card>
<fraud-info>
<fraud-session-id>1234567890</fraud-session-id>
</fraud-info>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2183634</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>1.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<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 Oxford</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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</billing-contact-info>
<credit-card>
<card-number>4111111111111111</card-number>
<expiration-month>09</expiration-month>
<expiration-year>2023</expiration-year>
<security-code>123</security-code>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
<store-id>12700</store-id>
<vat-code>123abc123</vat-code>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2180434</sku-id>
</sku>
<quantity>1</quantity>
<sku-parameter>
<param-name>instructions</param-name>
<param-value>Please follow the instructions</param-value>
</sku-parameter>
</cart-item>
</cart>
<expected-total-price>
<amount>20.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context?returnrepresentation=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context xmlns="http://ws.plimus.com">
<web-info>
<ip>62.219.121.253</ip>
<remote-host>bzq-219-121-253.static.bezeqint.net.reinventhosting.com</remote-host>
<user-agent>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; GTB6.3; .NET CLR 2.0.50727)</user-agent>
</web-info>
<shopper-details>
<shopper>
<shopper-info>
<shopper-contact-info>
<first-name>Jane</first-name>
<last-name>Shopper</last-name>
<email>[email protected]</email>
<address1>123 Oxford</address1>
<city>Boston</city>
<state>ma</state>
<zip>54321</zip>
<country>us</country>
<phone>1800808080</phone>
</shopper-contact-info>
<store-id>19805</store-id>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<ordering-shopper>
<local-bank-transfer/>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2343187</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>6.36</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context 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-details>
<shopper>
<fraud-info>
<fraud-session-id>1234567890</fraud-session-id>
</fraud-info>
<shopper-info>
<shopper-contact-info>
<title>Mr</title>
<first-name>ShopperPPFirst</first-name>
<last-name>ShopperPPLast</last-name>
<email>[email protected]</email>
<company-name>Company PP</company-name>
<address1>173 Willesden Ln</address1>
<address2 />
<city>London</city>
<zip>NW6</zip>
<country>UK</country>
<phone>180098989878</phone>
<fax>180098989878</fax>
</shopper-contact-info>
<store-id>10980</store-id>
<vat-code />
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<ordering-shopper>
<paypal>
<pp-cancel-url>http://www.cancel-site.com</pp-cancel-url>
<pp-return-url>http://www.success-site.com</pp-return-url>
<pp-req-confirm-shipping>1</pp-req-confirm-shipping>
<pp-no-shipping>0</pp-no-shipping>
<pp-in-context>false<pp-in-context>
</paypal>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2188078</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>30.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>30.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<paypal>
<pp-cancel-url>http://merchant-site.com/paypal-cancel</pp-cancel-url>
<pp-return-url>http://merchant-site.com/paypal-success</pp-return-url>
<pp-no-shipping>2</pp-no-shipping>
<pp-req-confirm-shipping>0</pp-req-confirm-shipping>
<pp-in-context>true</pp-in-context>
</paypal>
<fraud-info>
<fraud-session-id>1234567890</fraud-session-id>
</fraud-info>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2186520</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>0.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<paypal>
<pp-cancel-url>http://merchant-site.com/paypal-cancel</pp-cancel-url>
<pp-return-url>http://merchant-site.com/paypal-success</pp-return-url>
<pp-no-shipping>2</pp-no-shipping>
<pp-req-confirm-shipping>0</pp-req-confirm-shipping>
</paypal>
<fraud-info>
<fraud-session-id>1234567890</fraud-session-id>
</fraud-info>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2188676</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
<cart-item>
<sku>
<sku-id>2176834</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>1.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<shopper-info>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
<wallet-id>735</wallet-id>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2183716</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>10.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>10.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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-details>
<shopper>
<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 Oxford</address1>
<address2 />
<city>City</city>
<state>NY</state>
<zip>54321</zip>
<country>US</country>
</shipping-contact-info>
<invoice-contacts-info>
<invoice-contact-info>
<default>true</default>
<company-name>Company/company-name>
<vat-code></vat-code>
<title>Mrs.</title>
<first-name>John</first-name>
<last-name>Doe</last-name>
<address1>5 Star drive</address1>
<address2>3rd entrance</address2>
<city>Purchase</city>
<state>NY</state>
<zip>34645</zip>
<country>US</country>
<phone>1800400500</phone>
<fax>1800400500</fax>
<email>[email protected]</email>
</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>
<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>
<store-id>12700</store-id>
<vat-code></vat-code>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context?returnrepresentation=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<wallet>
<wallet-type>APPLE_PAY</wallet-type>
<encoded-payment-token>eyAgDQogICAidrZW4iOnsgIA0KICAgICAgInBhe==
</encoded-payment-token>
</wallet>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2186654</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>260.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context?returnrepresentation=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<shopper-id>19505364</shopper-id>
<credit-card>
<card-last-four-digits>1111</card-last-four-digits>
<security-code>123</security-code>
<card-type>VISA</card-type>
</credit-card>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>20.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/batch/order-placement \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context xmlns="http://ws.plimus.com">
<web-info>
<ip>62.219.121.253</ip>
<remote-host>bzq-219-121-253.static.bezeqint.net.reinventhosting.com</remote-host>
<user-agent>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.3; .NET CLR 2.0.50727)</user-agent>
<accept-language>en-us</accept-language>
</web-info>
<shopper-details>
<shopper>
<shopper-info>
<shopper-contact-info>
<title>Mr</title>
<first-name>Vitaly</first-name>
<last-name>Fligel</last-name>
<email>[email protected]</email>
<company-name>JS Company</company-name>
<address1>123 Oxford</address1>
<address2/>
<city>London</city>
<state>ca</state>
<zip>54321</zip>
<country>US</country>
<phone>1800808080</phone>
<fax>9999947238292</fax>
</shopper-contact-info>
<shipping-contact-info>
<first-name>Shipping first name</first-name>
<last-name>Shipping last name</last-name>
<address1>123 Oxford</address1>
<address2/>
<city>London</city>
<state>ca</state>
<zip>54321</zip>
<country>us</country>
</shipping-contact-info>
<payment-info>
<credit-cards-info>
<credit-card-info>
<billing-contact-info>
<first-name>John4</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>4012 0000 3333 0026</card-number>
<security-code>111</security-code>
<card-type>VISA</card-type>
<expiration-month>12</expiration-month>
<expiration-year>2023</expiration-year>
</credit-card>
</credit-card-info>
</credit-cards-info>
</payment-info>
<store-id>1980</store-id>
<shopper-currency>USD</shopper-currency>
<locale>en</locale>
</shopper-info>
</shopper>
</shopper-details>
<order-details>
<order>
<cart>
<cart-item>
<sku>
<sku-id>2187116</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
<cdod>false</cdod>
</cart>
<expected-total-price>
<amount>115.00</amount>
<currency>USD</currency>
</expected-total-price>
<store-card>false</store-card>
</order>
</order-details>
</shopping-context>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/shopping-context \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context 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>
<order-details>
<order>
<ordering-shopper>
<wallet>
<wallet-type>GOOGLE_PAY</wallet-type>
<encoded-payment-token>eyJhcGlWZXJzaW9uTWluJ9</encoded-payment-token>
</wallet>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
Response Examples
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/shopping-context/3990807
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/shopping-context/3923105
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<buynow-sso-token>TmccAdrae%2F5yQ3bPttIBKZJO2YkVXsDEkAHi1seNy4T46u4EYxAJDixd%2BPGgRfhyYi3Z1B3lMjt17ywBxpLfCtXiPWCc1zVIkb2zxl40qySaOpFCvHFKJLpTTaN6D%2B4x</buynow-sso-token>
<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>
<order-details>
<order>
<order-id>3923105</order-id>
<ordering-shopper>
<shopper-id>19505574</shopper-id>
</ordering-shopper>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
<sku-name>Example contract 2</sku-name>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
<item-sub-total>50.00</item-sub-total>
</cart-item>
<tax>0.00</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>50.00</total-cart-cost>
</cart>
</order>
</order-details>
</shopping-context>
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/shopping-context/3936017
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<web-info>
<ip>62.219.121.253</ip>
<remote-host>bzq-219-121-253.static.bezeqint.net.reinventhosting.com</remote-host>
<user-agent>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; GTB6.3; .NET CLR 2.0.50727)</user-agent>
</web-info>
<order-details>
<order>
<order-id>8322757</order-id>
<ordering-shopper>
<shopper-id>22195529</shopper-id>
</ordering-shopper>
<transaction-payment-info>
<local-bank-transfer-info>
<swift-code>CITI US 33</swift-code>
<payment-reference>410000368169</payment-reference>
<additional-reference>8322757</additional-reference>
<account-holder>Global Collect BV</account-holder>
<bank-code>ABA|021000089</bank-code>
<bank-name>Citibank USA</bank-name>
<country-description>United States</country-description>
<status-id>800</status-id>
<bank-city>New York</bank-city>
<bank-account-number>40673525</bank-account-number>
</local-bank-transfer-info>
</transaction-payment-info>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2343187</sku-id>
<sku-name>Product A</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>5.99</item-sub-total>
</cart-item>
<tax>0.37</tax>
<tax-rate>6.25</tax-rate>
<total-cart-cost>6.36</total-cart-cost>
</cart>
<fraud-result-info>
<device-data-collector>N</device-data-collector>
</fraud-result-info>
</order>
</order-details>
</shopping-context>
HTTP/ 1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<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>
<order-details>
<order>
<order-id>3981975</order-id>
<ordering-shopper>
<shopper-id>19564898</shopper-id>
</ordering-shopper>
<transaction-payment-info>
<paypal-info>
<url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-7HH373857W185241M</url>
</paypal-info>
</transaction-payment-info>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2188078</sku-id>
<sku-name>Example contract</sku-name>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>33.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
<item-sub-total>30.00</item-sub-total>
</cart-item>
<tax>0</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>30.00</total-cart-cost>
</cart>
</order>
</order-details>
</shopping-context>
HTTP/ 1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<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>
<order-details>
<order>
<order-id>3981977</order-id>
<seller-order-id>364444</seller-order-id>
<ordering-shopper>
<shopper-id>19564900</shopper-id>
</ordering-shopper>
<transaction-payment-info>
<paypal-info>
<url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-22562160R8730154V</url>
</paypal-info>
</transaction-payment-info>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2186520</sku-id>
<sku-name>recurring</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>30.00</item-sub-total>
</cart-item>
<tax>0.00</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>30.00</total-cart-cost>
</cart>
</order>
</order-details>
</shopping-context>
HTTP/ 1.1 201 Created
Location: https://sandbox.bluesnap.com/services/2/shopping-context/3990105
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<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>
<order-details>
<order>
<order-id>3990105</order-id>
<ordering-shopper>
<shopper-id>19572392</shopper-id>
</ordering-shopper>
<transaction-payment-info>
<paypal-info>
<url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-66E98375FU949215L</url>
<pp-error-code>11452</pp-error-code>
<pp-short-comment>Merchant not enabled for reference transactions</pp-short-comment>
<pp-long-comment>Merchant not enabled for reference transactions</pp-long-comment>
</paypal-info>
</transaction-payment-info>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2188676</sku-id>
<sku-name>Example contract 1</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>0.00</item-sub-total>
</cart-item>
<cart-item>
<sku>
<sku-id>2176834</sku-id>
<sku-name>Example contract 2r</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>1.00</item-sub-total>
</cart-item>
<tax>0.00</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>1.00</total-cart-cost>
</cart>
</order>
</order-details>
</shopping-context>
HTTP/ 1.1 200 Ok
<?xml version="1.0" encoding="UTF-8"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<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>
<order-details>
<order>
<order-id>3923105</order-id>
<soft-descriptor>BLS*BS</soft-descriptor>
<ordering-shopper>
<shopper-id>19505574</shopper-id>
</ordering-shopper>
<transaction-payment-info>
<wallet>
<billing-contact-info>
<first-name>John</first-name>
<last-name>Doe</last-name>
<address1>South St</address1>
<city>Waltham</city>
<state>MA</state>
<zip>02453</zip>
</billing-contact-info>
</wallet>
</transaction-payment-info>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2178316</sku-id>
<sku-name>Example contract 2</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>50.00</item-sub-total>
</cart-item>
<tax>0.00</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>50.00</total-cart-cost>
</cart>
</order>
</order-details>
</shopping-context>
Content-length: 0
Date: Mon, 02 Jul 2018 11:23:01 GMT
Location: https://buynow2.com:8444/services/2/shopping-context/4053525
Server: Apache-Coyote/1.1
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<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>
<order-details>
<order>
<order-id>4057685</order-id>
<soft-descriptor>BLS*BLUESNAP</soft-descriptor>
<ordering-shopper>
<shopper-id>19637376</shopper-id>
</ordering-shopper>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2170716</sku-id>
<sku-name>shevie subscription sub2</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>25.00</item-sub-total>
</cart-item>
<tax>0.00</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>25.00</total-cart-cost>
</cart>
<fraud-result-info>
<device-data-collector>N</device-data-collector>
</fraud-result-info>
</order>
</order-details>
</shopping-context>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shopping-context xmlns="http://ws.plimus.com">
<step>CREATED</step>
<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>
<order-details>
<order>
<order-id>4057687</order-id>
<soft-descriptor>BLS*BLUESNAP</soft-descriptor>
<ordering-shopper>
<shopper-id>19637378</shopper-id>
</ordering-shopper>
<transaction-payment-info>
<wallet>
<wallet-type>GOOGLE_PAY</wallet-type>
<billing-contact-info>
<first-name>John</first-name>
<last-name>Doe</last-name>
<address1>South Street</address1>
<city>Waltham</city>
<state>MA</state>
<zip>02453</zip>
<country>us</country>
</billing-contact-info>
<tokenized-card>
<card-last-four-digits>7971</card-last-four-digits>
<card-type>VISA</card-type>
<card-sub-type>CREDIT</card-sub-type>
<dpan-expiration-month>9</dpan-expiration-month>
<dpan-expiration-year>2023</dpan-expiration-year>
<dpan-last-four-digits>6092</dpan-last-four-digits>
</tokenized-card>
</wallet>
</transaction-payment-info>
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2170716</sku-id>
<sku-name>shevie subscription sub2</sku-name>
</sku>
<quantity>1</quantity>
<item-sub-total>25.00</item-sub-total>
</cart-item>
<tax>1.56</tax>
<tax-rate>6.25</tax-rate>
<total-cart-cost>26.56</total-cart-cost>
</cart>
</order>
</order-details>
</shopping-context>
Example Descriptions
Create Shopping Context: without payment info
The example above shows how to create shopping context without sending any payment information.
Create Shopping Context: with payment info
The example above shows how to create shopping context and include the payment information in the payment-info
parameter.
Create Shopping Context: with returnrepresentation parameter
When you include the returnrepresentation
parameter in your request URL, the response will include the shopping-context
parameter, as shown in the example above. Otherwise, the response body will be empty.
Create Shopping Context: with existing shopper
The example above shows how to create shopping context with an existing shopper by sending the shopper-id
within the order-details
resource. In this case, the shopper has a single payment method so we there is no need to specify which one to use.
Create Shopping Context: with shopper with multiple payment methods
When you create shopping context with an existing shopper that has multiple payment methods, you will need to specify which one to use within the order-details
resource. In the example above, the request specifies that a credit card with last four digits of 1111 and type of Visa should be used.
Create Shopping Context: with seller order ID
The example above shows how you can set your own unique ID for the order by sending it as the value of the seller-order-id
parameter within the order-details
resource.
Create Shopping Context: overriding SKU price and name
The example above shows how to override the SKU's price and name by sending the sku-charge-price
and sku-name
parameters within the order-details
resource.
Create Shopping Context: with fraud info
You are required to send the shopper's unique device fingerprint for fraud check purposes. Send this in the fraud-info
property in your request. Refer to fraud-info.
If the request uses an existing shopper (as shown in the example above), the fraud-info
element should sent within order-details
> ordering-shopper
. In case of a new shopper, it should be sent within shopper-details
> shopper
.
For more information, refer to Fraud prevention.
Create Shopping Context: with custom parameters
In the example above, there is an input type custom parameter called 'instructions', which is set to be 'Please follow the instructions'.
Create Shopping Context: with local bank transfer
The example above shows how to indicate local bank transfer is the payment method by sending the local-bank-transfer
resource within the request. The request URL should contain the returnrepresentation
query parameter set to true, so that the response will include the full XML representation of the created shopping-context
with the relevant details for the bank transfer. Note that it is also possible to retrieve the details later using the Retrieve Shopping Context service. For a full list of accepted shopper countries and currencies, refer to Supported Local Bank Transfer Countries & Currencies.
Create Shopping Context: PayPal
When creating Shopping Context with PayPal, you will include the paypal
resource within order-details
> order
> ordering-shopper
.
In the paypal
resource, you must provide:
pp-cancel-url
: The URL to which the shopper will be directed if they click cancel in the PayPal page.pp-return-url
: The URL to which the shopper will be directed after completing the purchase on PayPal, once the invoice is registered in BlueSnap.
For details about other settings, regarding the shipping address and in-context checkout, refer to the PayPal Guide.
The response from PayPal may include comments and error codes that suggest a limitation on the use of the PayPal token. Comments & error messages received from PayPal are displayed in the paypal-info
resource in the response.
Create Shopping Context: with wallet ID
If this is a Shopping Context for a new shopper and you want to add wallet details for MasterPass or Visa Checkout, you can use the wallet details, including the payment info and billing and shipping info, by including the wallet-id
in the request.
For details, refer to:
For an existing shopper, do not include the wallet-id
in the request. Instead, you must first save the wallet information to that shopper using the Update Shopper request. You can then create Shopping Context with the relevant shopper ID.
Create Shopping Context: with Hosted Payment Fields token
If you are using BlueSnap's Hosted Payment Fields, and this Shopping Context is for a new shopper, you can use the 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.
For an existing shopper, do not send the pf-token
property in the Create Shopping Context request. Instead, you must first save the Hosted Payment Fields information to that shopper using the Update Shopper request. You can then create Shopping Context with the relevant shopper ID.
Create Shopping Context: with Apple Pay
Include the wallet-type
= APPLE_PAY and encoded-payment-token
inside order-details
> order
> ordering-shopper
> wallet
.
-
If the shopper is new, set the query parameter
returnrepresentation
equal totrue
, meaning that theshopping-context
resource will be returned in the response and will include theshopper-id
property. Use theshopper-id
for all future transactions with this shopper. -
For existing shoppers, include the
shopper-id
withinorder-details
>order
>ordering-shopper
.
For more information, check out our Apple Pay Guide.
Note:
To test Apple Pay, follow the steps in the Apple Pay Guide. The API Explorer does not support Apple Pay testing.
Create Order: with shopper ID & CVV
You may wish to collect CVV on your checkout form from all your shoppers – even from returning shoppers. One reason you might choose to do this is because transactions with CVV generally result in higher success rates.
Above is an example of sending CVV in a request involving a returning shopper.
Include shopper-id
and CVV in the request as in the example.
Create Shopping Context: with store card approval
This example shows an Create Shopping Context request with the store-card
value set. You will want to use this value to define if the shopper has approved storing their credit card information for future use. The default value is set to true. If set to false, the credit card data will not be stored.
Create Shopping Context: with Google Pay
Include the wallet-type
= GOOGLE_PAY and encoded-payment-token
inside order-details
> order
> ordering-shopper
> wallet
.
For more information, check out our Google Pay Guide.
Back to Top