The shoppingCart
represents customer shopping cart for which a payment is triggered.
Example:
<shoppingCart>
<items>
<item>
<product>
<id>123</id>
<name>Jeans</name>
<description>stonewashed</description>
<unitPrice>
<grossAmount>40</grossAmount>
<taxAmount rate="20" name="VAT">6.67</taxAmount>
</unitPrice>
<type>Physical</type>
</product>
<quantity>1</quantity>
<totalPrice>
<grossAmount>30</grossAmount>
<taxAmount rate="20" name="VAT">5</taxAmount>
</totalPrice>
<discount>
<name>Jeans-Promotion</name>
<grossAmount>-10</grossAmount>
<taxAmount rate="20" name="VAT">-1.67</taxAmount>
</discount>
</item>
<item>
<product>
<id>456</id>
<name>CD Rom</name>
<description>CD Rom</description>
<unitPrice>
<grossAmount>50</grossAmount>
<taxAmount rate="10" name="VAT">4.54</taxAmount>
</unitPrice>
<type>Digital</type>
</product>
<quantity>2</quantity>
<totalPrice>
<grossAmount>80</grossAmount>
<taxAmount rate="10" name="MwSt">7.27</taxAmount>
</totalPrice>
<discount>
<name>Spring-Promotion</name>
<grossAmount>-20</grossAmount>
<taxAmount rate="10" name="VAT">-1.82</taxAmount>
</discount>
</item>
<item>
<product>
<id>789</id>
<name>Gift Card</name>
<description>Gift Card Purchase</description>
<unitPrice>
<grossAmount>15</grossAmount>
<taxAmount rate="20" name="VAT">2.5</taxAmount>
</unitPrice>
<type>GiftCard</type>
</product>
<quantity>1</quantity>
<totalPrice>
<grossAmount>15</grossAmount>
<taxAmount rate="20" name="VAT">2.5</taxAmount>
</totalPrice>
</item>
</items>
<subTotalAmount>125</subTotalAmount>
<shippingCost>
<name>Express</name>
<grossAmount>30</grossAmount>
<taxAmount rate="20" name="VAT">5</taxAmount>
</shippingCost>
<discounts>
<discount>
<name>Sales-Discount</name>
<grossAmount>-10</grossAmount>
<taxAmount rate="20" name="VAT">-1.67</taxAmount>
<type>Discount</type>
</discount>
</discounts>
<amountsByTax>
<amountByTax taxName="VAT" taxRate="10">
<grossAmount>80</grossAmount>
<taxAmount>7.27</taxAmount>
</amountByTax>
<amountByTax taxName="VAT" taxRate="20">
<grossAmount>45</grossAmount>
<taxAmount>7.5</taxAmount>
</amountByTax>
</amountsByTax>
<totalAmount>145</totalAmount>
<totalTaxAmount>18.1</totalTaxAmount>
</shoppingCart>
Fields:
field (type, required) | description |
---|---|
items | The shopping cart items |
items.item | One item of the shopping cart |
items.item.product | Product |
items.item.product.id | Product ID |
items.item.product.name | Product Name |
items.item.product.description | Product Description |
items.item.product.unitPrice | Price of the Product Item (per unit) including tax if applicable |
items.item.product.type | The type of the product |
items.item.quantity | Number of items |
items.item.totalPrice | Total price considering numbers of item and unit price including tax if applicable |
items.item.discount | Total discount per item with tax (if applicable) and discount name (name is mandatory). |
subTotalAmount | Sub total amount of the shopping cart. This amount does not include potential shipping costs or discounts on shopping cart level |
shippingCost | Shipping Costs with Tax (if applicable) and Name (name is mandatory) |
discounts | Discount(s) on shopping cart level. |
amountsByTax | Collection of amountByTax (max 100 items) |
amountsByTax.amountByTax | List of grouped amounts per tax category |
amountsByTax.amountByTax.taxName | Name/description of the Tax type |
amountsByTax.amountByTax.taxRate | Tax rate (percentage) |
amountsByTax.amountByTax.grossAmount | Gross Amount of tax category group (sum of totalPrice of all items with the same tax rate), grouped per tax rate |
amountsByTax.amountByTax.taxAmount | Tax amount of tax category group (sum of totalPrice of all items with the same tax rate), grouped per tax rate |
totalAmount | Total amount of the shopping cart. This amount also includes potential shipping costs or discounts on shopping cart level |
totalTaxAmount | Total tax amount of the shopping cart (if applicable). This amount also includes the tax of potential shipping costs or discounts on shopping cart level |
Please note that the total amount of the shopping cart is not part of the shoppingCart element, but is to be found in getRedirectDataRequest.redirectParameters.grossAmount or initiatePayment.amount.
XML Schema:
<s:complexType name="shoppingCart">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="items">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="100" name="item" >
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="product">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="id" type="lengthRestrictedString" />
<s:element minOccurs="1" maxOccurs="1" name="name" type="lengthRestrictedString" />
<s:element minOccurs="0" maxOccurs="1" name="description" type="lengthRestrictedString" />
<s:element minOccurs="1" maxOccurs="1" name="unitPrice" type="amountWithTax" />
<s:element minOccurs="0" maxOccurs="1" name="type" type="itemType" />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="1" maxOccurs="1" name="quantity" type="positiveInt" />
<s:element minOccurs="1" maxOccurs="1" name="totalPrice" type="amountWithTax" />
<s:element minOccurs="0" maxOccurs="1" name="discount" type="amountWithTaxAndName" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="subTotalAmount" type="s:decimal" />
<s:element minOccurs="0" maxOccurs="1" name="shippingCost" type="amountWithTaxAndName" />
<s:element minOccurs="0" maxOccurs="1" name="discounts" nillable="true">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="100" name="discount" type="amountWithTaxAndNameAndType" />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="amountsByTax" nillable="true">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="100" name="amountByTax" type="amountByTax"></s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="totalAmount" type="s:decimal" />
<s:element minOccurs="0" maxOccurs="1" name="totalTaxAmount" type="s:decimal" />
</s:complexType>