Product Catalogue
This document describes how to supply item-level order information in REST API requests that contain order.basket.
Basket items supplement the transaction amount. They do not replace the request's mandatory transactionAmount.total and transactionAmount.currency fields.
Basket information is supplied below order:
order
└── basket
├── productStock
└── items[]
├── id
├── description
├── quantity
├── unitPrice
├── subTotal
├── valueAddedTax
├── localTax
├── deliveryAmount
├── chargeTotal
├── currency
├── unit
├── category
├── detailedCategory
└── options[]
├── name
└── choice
Presence: m = mandatory, c = conditional, o = optional, - = exposed in the schema but not used as an item-level override.
Basket fields
| JSON path | Description | Presence |
|---|---|---|
order.basket | Basket information associated with the order. | o |
order.basket.items | List of item-level amounts and product information. If omitted or empty, no basket items are recorded. | o |
order.basket.productStock | Set to check to request configured product-inventory validation. See Product stock checking. | o |
Basket item fields
All amount fields describe the current item entry, including all units represented by that entry unless stated otherwise.
| JSON path | Description | Presence |
|---|---|---|
order.basket.items[].id | Merchant product or item identifier. Required when productStock=check is used. | c |
order.basket.items[].description | Product name or short description. | o |
order.basket.items[].quantity | Number of units represented by the item entry. Supply it when using unitPrice or product-stock checking. | c |
order.basket.items[].unitPrice | Price of one unit before item-level tax and delivery amounts. Use no more than three decimal places. | o |
order.basket.items[].subTotal | Extended item subtotal before tax and delivery: quantity * unitPrice. Required when valueAddedTax, localTax, or deliveryAmount is supplied. | c |
order.basket.items[].valueAddedTax | Total value-added-tax amount for this item entry. | o |
order.basket.items[].localTax | Total local-tax amount for this item entry. | o |
order.basket.items[].deliveryAmount | Total delivery or shipping amount allocated to this item entry. | o |
order.basket.items[].chargeTotal | Final total for this item entry, including its subtotal, tax, and delivery components. The Gateway requires this field for every submitted basket item. | m |
order.basket.items[].currency | Item-level currency from the schema. It does not override the transaction currency; use transactionAmount.currency. | - |
order.basket.items[].unit | Unit of measure, for example piece, litre, kilogram, or ticket. | o |
order.basket.items[].category | Merchant-defined product category. | o |
order.basket.items[].detailedCategory | More detailed merchant-defined product classification. | o |
order.basket.items[].options | Product choices or variants associated with the item. | o |
Item option fields
| JSON path | Description | Presence |
|---|---|---|
order.basket.items[].options[].name | Option name, for example colour, size, or format. Supply it when an option is included. | c |
order.basket.items[].options[].choice | Selected value for the option. | o |
Amount calculation rules
For each basket item, calculate the amounts as follows:
subTotal = quantity * unitPrice
chargeTotal = subTotal
+ valueAddedTax
+ localTax
+ deliveryAmount
Treat an omitted optional amount component as zero for the calculation. Do not omit chargeTotal; the Gateway does not derive a missing item total.
The following rules apply:
unitPriceis the price for one unit.subTotalis the extended subtotal for all units in the item entry. It is not another unit-price field.valueAddedTax,localTax, anddeliveryAmountare totals for the item entry, not per-unit values.chargeTotalmust equal the sum of the supplied item components.- Item amount components use
transactionAmount.currencyand must fit that currency's supported fraction digits. transactionAmount.totalremains mandatory. For a transaction containing only the documented basket amounts, it normally equals the sum of all itemchargeTotalvalues.
Example
The following request fragment contains one item with seven units. Payment-method and authentication fields are omitted so the example can focus on the basket.
{
"requestType": "PaymentCardSaleTransaction",
"transactionAmount": {
"total": 365.00,
"currency": "EUR"
},
"order": {
"orderId": "ORDER-10001",
"basket": {
"items": [
{
"id": "ITEM-01",
"description": "Example product",
"quantity": 7,
"unitPrice": 50.00,
"subTotal": 350.00,
"valueAddedTax": 10.00,
"localTax": 2.00,
"deliveryAmount": 3.00,
"chargeTotal": 365.00,
"unit": "piece",
"category": "books",
"detailedCategory": "technical-books",
"options": [
{
"name": "format",
"choice": "hardcover"
}
]
}
]
}
}
}
Calculation:
subTotal = 7 * 50.00 = 350.00
chargeTotal = 350.00 + 10.00 + 2.00 + 3.00 = 365.00
Example without tax or delivery
Tax and delivery fields may be omitted when they do not apply, but chargeTotal must still be supplied.
{
"id": "ITEM-02",
"quantity": 2,
"unitPrice": 12.50,
"subTotal": 25.00,
"chargeTotal": 25.00
}
Multiple items
Validate every item independently. The transaction total is separate from the per-item totals.
item 1 chargeTotal = 25.00
item 2 chargeTotal = 40.00
transactionAmount.total = 65.00
If the transaction also contains an amount that is not allocated to a basket item, include that amount when calculating transactionAmount.total according to the applicable payment scenario.
Product stock checking
Set order.basket.productStock to check only when product-inventory validation is enabled for the store.
When stock checking is requested:
- supply an
idthat identifies a configured catalogue product; - supply the requested
quantity; - supply option
nameandchoicevalues when inventory depends on a product variant; - expect the request to fail if the product or selected option is unknown, the requested stock is unavailable, or inventory checking is not enabled for the store.
Omit productStock when the basket is supplied only for order detail, reporting, or payment-method processing.
Validation errors
| Condition | Typical REST API result |
|---|---|
chargeTotal is missing | HTTP 400, error code INVALID_INPUT, field Total, with total has to be set. |
A tax or delivery component is present but subTotal is missing | HTTP 400, error code INVALID_INPUT, field Subtotal. |
chargeTotal does not equal the sum of the supplied components | HTTP 400, error code INVALID_INPUT, with an amount-component mismatch detail. |
| An item amount has more fraction digits than the transaction currency permits | HTTP 400, error code INVALID_INPUT, with a fraction-digits detail. |
productStock=check is requested without the required store configuration | HTTP 400, error code INVALID_INPUT, field productStock. |
Operational rules
| Rule | Expected behavior |
|---|---|
| Item totals | Calculate and send subTotal and chargeTotal explicitly. Do not rely on the Gateway to derive them. |
| Unit price versus subtotal | Keep unitPrice as the price for one unit and subTotal as the extended amount for all units. |
| Currency | Use transactionAmount.currency as the currency for every basket-item amount. Do not use the item currency field to request a mixed-currency basket. |
| Multiple items | Validate each item's component equation and calculate transactionAmount.total separately. |
| Empty basket | Omitting items, or sending an empty list, results in no item details being recorded. |
| Inventory | Use productStock=check only for stores configured for catalogue and inventory processing. |
| Data protection | Do not place card data, authentication values, secrets, or other payment credentials in product descriptions, categories, IDs, or options. |
Updated about 13 hours ago