Basket

On this page:

Overview

The shopping basket content is passed in a colon-deliminated string forming the Basket value.

Example Basket

Basket Example Table

Items

Quantity

Item Value

Item Tax

Item Total

Line Total

Wireless Central Heating System

1

424.68

74.32

499.00

499.00

Wireless thermostat

3

11.91

2.08

13.99

41.97

Automated TRV

2

11.05

1.94

12.99

25.98

Delivery

---

---

---

---

4.99

 

The example Basket value's colon-deliminated string is as follows:

4:Wireless Central Heating System:1:424.68:74.32:499.00:499.00:Wireless thermostat:3:11.91:2.08:13.99:41.97:Automated TRV:2:11.05:1.94:12.99:25.98:Delivery:1::::4.99

Explanation

The basket rows are organised as lines and column values:

  • Number of lines in the basket field
  • Line 1, Item 1 Description
    • Item 1 Quantity
    • Item 1 item value without tax
    • Item 1 tax value
    • Item 1 cost including tax
    • Item 1 total cost (cost including tax multiplied by quantity)
  • Line 2, Item 2 Description
    • Item 2 Quantity
    • Item 2 item value without tax
    • Item 2 tax value
    • Item 2 cost including tax
    • Item 2 total cost (cost including tax multiplied by quantity)
  • Etc.

Forming the String

The basket lines and column values are formatted as a colon-deliminated string as follows:

[Number of lines]:[Item 1 Description]:[Quantity]:[Value without Tax]:[Tax Value]:[Cost with Tax]:[Total Cost]:[Item 2 Description]:[Quantity]:[Value without Tax]:[Tax Value]:[Cost with Tax]:[Total Cost]: etc

Important: Empty fields must be delimited using colons. For example:

Delivery:1::::4.99

Numbers of Lines

The first value in the colon-deliminated string is the number of lines in the Basket field. Sometimes this is confused with the total number of items ordered.

In the example basket: 

  • The total number of items in the basket is 7 comprising: 
    • A DVD player
    • 5 DVDs
    • Delivery.
  • Each product type is listed on its own line as follows:
    • Line 1. DVD player quantity of 1.
    • Line 2. DVD quantity of 3.
    • Line 3. DVD quantity of 2.
    • Line 4. Delivery quantity of 1

The number of lines in the example Basket is 4.

 

❮ Back to MerchantRiskIndicatorXML Next: BasketXML ❯