Outline with Sub-Baskets

First, we concentrate on the greater outline:

Smart Transaction
{
// ...
   "basket": {
"products": [
{
"item_type": "sub_transaction",
"desc": "Order for Muster-Elektrogeräte GmbH",
"sum": 9350,
"reference_id": "1002",
"contract_id": "GCR_ZPMJGRH4SU3X0H3Y3WYB69XVXAG8PJ",
"sub_basket": [
// ...
]
}
]
},
"basket_info": {
"sum": 9350,
"currency": "EUR"
},
   // ...
}

Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent).

These are the fields:

Field

Type

Meaning

basket

object

Optional basket.

basket/products

array

Either items of a regular basket or sub-baskets of a mixed basket.

basket/products/#/item_type

string

Always sub_transaction for a sub-basket.

basket/products/#/desc

string

Short description of the sub-basket.

basket/products/#/sum

int

Total of the sub-basket in the smalles currency unit. All payable items in the sub-basket must sum up to this total.

basket/products/#/reference_id

string

Unique identifier. The payment will be split in multiple Payment Transactions, a main transactions and sub-transactions for each sub-basket. The reference_id connects the sub-transaction and its sub-basket.

basket/products/#/contract_id

string

Payment Contract ID of the supplier of this sub-basket.

basket/products/#/sub_basket

array

Basket Items of the sub-basket (details below).

basket_info

object

Amount to pay. (Amongst other details not of interest here.)

basket_info/sum

int

Amount to pay in the smallest currency unit. All items of a regular basket or all sub-baskets must sum up to the order total in basket_info/sum.

basket_info/currency

string

ISO three-letter currency code. Defaults to EUR.