shoppingCart

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
(arrayOfItem, required)

The shopping cart items

items.item
(item, required)

One item of the shopping cart

items.item.product
(product, required)

Product

items.item.product.id
(string, required)

Product ID

items.item.product.name
(string, required)

Product Name
Example: "Jeans"

items.item.product.description
(string)

Product Description
Example: "Stonewashed Size L"

items.item.product.unitPrice
(amountWithTax, required)

Price of the Product Item (per unit) including tax if applicable

items.item.product.type
(itemType)

The type of the product
Needed for specific payment methods, e.g. Klarna Deposit
The allowed values for this field can be found on the relevant payment method documentation page.

items.item.quantity
(positiveInt, required)

Number of items

items.item.totalPrice
(amountWithTax, required)

Total price considering numbers of item and unit price including tax if applicable
Calculation: (unitPrice - discount per unit) x quantity = totalPrice
or
unitPrice x quantity - total discount per item = totalPrice

items.item.discount
(amountWithTaxAndName)

Total discount per item with tax (if applicable) and discount name (name is mandatory).
Calculation: discount per unit x quantity

subTotalAmount
(decimal)

Sub total amount of the shopping cart. This amount does not include potential shipping costs or discounts on shopping cart level

shippingCost
(amountWithTaxAndName)

Shipping Costs with Tax (if applicable) and Name (name is mandatory)

discounts
(array of type amountWithTaxAndNameAndType)

Discount(s) on shopping cart level.
Collection of discount (max 100 items)

amountsByTax
(array of type amountByTax)

Collection of amountByTax (max 100 items)

amountsByTax.amountByTax
(amountByTax)

List of grouped amounts per tax category

amountsByTax.amountByTax.taxName
(amountByTax, attribute)

Name/description of the Tax type
Example: "VAT"

amountsByTax.amountByTax.taxRate
(amountByTax, attribute)

Tax rate (percentage)
Example: "10"

amountsByTax.amountByTax.grossAmount
(amountByTax)

Gross Amount of tax category group (sum of totalPrice of all items with the same tax rate), grouped per tax rate

amountsByTax.amountByTax.taxAmount
(amountByTax)

Tax amount of tax category group (sum of totalPrice of all items with the same tax rate), grouped per tax rate

totalAmount
(decimal)

Total amount of the shopping cart. This amount also includes potential shipping costs or discounts on shopping cart level

totalTaxAmount
(decimal)

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>