---
title: "Shopping cart"
canonical_url: https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/shopping-cart
---

1. [Home](https://docs.connect.worldline-solutions.com/)
2. [Developer tools](https://docs.connect.worldline-solutions.com/documentation.md)
3. [Hosted payment pages](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages.md)
4. Shopping cart

Page topics  

# Shopping cart object

* [Basic usage](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/shopping-cart.md#basicusage)
* [Extended usage](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/shopping-cart.md#extendedusage)

The shopping cart object lets you optionally submit a set of properties in [Create hosted checkout](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/hostedcheckouts/create.html?paymentPlatform=ALL) call to display extra information on MyCheckout hosted payment pages. This object is located under order.shoppingCart.  
Not to be confused with shopping cart/plugins. This page describes the usage of the order overview in the shopping cart of a hosted checkout page.

## Basic usage

1. Create an items object with an amountOfMoney and invoiceData.
2. The invoiceData contains number of items, price per item and description.
3. Submit the created object in the items array.
4. The use of the orderLineDetails object is optional.

SHOPPING CART BASIC USAGECopy code

    {
      "hostedCheckoutSpecificInput": {
        "variant": "264",
        "locale": "en_GB"
      },
      "order": {
        "amountOfMoney": {
          "currencyCode": "EUR",
          "amount": 6500
        },
        "customer": {
          "contactDetails": {
            "emailAddress": "connect@worldline.com"
          },
          "merchantCustomerId": "11011011",
          "billingAddress": {
            "countryCode": "NL"
          }
        },
        "shoppingCart": {
          "items": [
            {
              "amountOfMoney": {
                "amount": 1500,
                "currencyCode": "EUR"
              },
              "invoiceData": {
                "nrOfItems": 1,
                "pricePerItem": 1500,
                "description": "Pop Band Shirt"
              }
            },
            {
              "amountOfMoney": {
                "amount": 5000,
                "currencyCode": "EUR"
              },
              "invoiceData": {
                "nrOfItems": 2,
                "pricePerItem": 2500,
                "description": "Black Sneakers"
              }
            }
          ]
        }
      }
    }

![Order summary showing Pop Band Shirt for EUR 15.00, Black Sneakers for EUR 50.00, and EUR 65.00 total.](https://docs.connect.worldline-solutions.com/dA/9b939962ba/image-2026-7-1_11-29-57.png?language_id=1)

Additional information and non-mandatory properties you can use:

* description becomes the "Item name" displayed to the consumer.
* merchantLinenumber and merchantPagenumber are internal only and won't be shown to the consumer.
* orderLineDetails may hold extra product/service information but is not displayed to the consumer.

|      Property      |    Type    | Required |                                                     Details                                                     |
|--------------------|------------|----------|-----------------------------------------------------------------------------------------------------------------|
| merchantLinenumber | string (5) | no       | Line number for printed invoice or order of items in the cart. Should be a numeric string.                      |
| merchantPagenumber | string (3) | yes      | Page number for printed invoice. Should be a numeric string                                                     |
| orderLineDetails   | object     | depends  | Object containing additional information that when supplied can have a beneficial effect on the discount rates. |

The example below is used to showcase the shopping cart request snippet for the airline order with the additional properties.  
SNIPPET EXAMPLECopy code

           {
              "amountOfMoney": {
                "amount": 501,
                "currencyCode": "EUR"
              },
              "invoiceData": {
                "description": "KL5630 (LAX-HNL) Flight from Los Angeles to Honolulu",
                "pricePerItem": 167,
                "nrOfItems": "3",
                "merchantLinenumber": "3",
                "merchantPagenumber": "1"
              },
              "orderLineDetails": {
                "productCode": "KL5630",
                "productName": "(LAX-HNL) Flight from Los Angeles to Honolulu",
                "productPrice": 186,
                "quantity": 3,
                "discountAmount": 315,
                "taxAmount": 258,
                "lineAmountTotal": 501,
                "productType": "ticket"
              }
            }
          ]

## Extended usage

The basic shopping cart object can display quantities and prices, and you can also show additional details like discounts and shipping costs using the amountBreakdown array, submitted at the root of the shoppingCart object.  
Note that amountBreakdown is not itemized; it applies to the entire cart. Each entry in the array includes two fields: amount and type.

We offer a simplified set of amountBreakdown categories to smooth the consumer experience:

* subtotal: sum of the items in the cart
* discount: positive amounts applied as discounts
* shipping costs
* handling costs
* taxes: combined total (including AIRPORT_TAX, CONSUMPTION_TAX, DUTY, TAX, and VAT; VAT cannot be shown separately)

We do not perform extra validation on the submitted amounts, we use the amounts as-is.  
SHOPPING CART EXTENDED USAGECopy code

    {
      "hostedCheckoutSpecificInput": {
        "variant": "264",
        "locale": "en_GB"
      },
      "order": {
        "amountOfMoney": {
          "currencyCode": "EUR",
          "amount": 6100
        },
        "customer": {
          "contactDetails": {
            "emailAddress": "connect@worldline.com"
          },
          "merchantCustomerId": "11011011",
          "billingAddress": {
            "countryCode": "NL"
          }
        },
        "shoppingCart": {
          "amountBreakdown": [{
            "amount": 100,
            "type": "HANDLING"
          }, {
            "amount": 500,
            "type": "SHIPPING"
          }, {
            "amount": 1000,
            "type": "DISCOUNT"
          }, {
            "amount": 6500,
            "type": "BASE_AMOUNT"
          }],
          "items": [{
            "amountOfMoney": {
              "amount": 1500,
              "currencyCode": "EUR"
            },
            "invoiceData": {
              "nrOfItems": 1,
              "pricePerItem": 1500,
              "description": "Pop Band Shirt"
            }
          }, {
            "amountOfMoney": {
              "amount": 5000,
              "currencyCode": "EUR"
            },
            "invoiceData": {
              "nrOfItems": 2,
              "pricePerItem": 2500,
              "description": "Black Sneakers"
            }
          }]
        }
      }
    }

![Order summary showing two items, EUR 65.00 subtotal, EUR 10.00 discount, EUR 5.00 shipping, EUR 1.00 handling, and EUR 65.00 total.](https://docs.connect.worldline-solutions.com/dA/000230e01e/image-2026-7-1_11-50-3.png?language_id=1)
