Checkout
checkout_sessionUse this when the customer has picked specific teas.co.uk products and wants to buy them straight away, for example from a product result. Puts exactly these items in a fresh basket at live teas.co.uk prices and returns it with a secure link to pay on teas.co.uk; the basket the customer built earlier is not used or changed. checkout_session.items takes up to 20 products, each with an id from find_products (offerId from the product feed is tried when the id is not found) and a quantity of 1 to 99; name, description, images, url, merchant_name and price are for display only and never change what is charged. Items teas.co.uk cannot find are listed in unavailable and the rest go ahead; if none are found it returns an error. Nothing is charged here and no order is placed until the customer pays on teas.co.uk. To check out the basket they have already built, use checkout_link instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checkout_session | Yes | The products to buy: items lists each product id (from find_products) and quantity, up to 20 products. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Number of items in the basket. | |
| lines | Yes | ||
| delivery | Yes | ||
| messages | Yes | Anything that could not be added or changed, in plain words. | |
| subtotal | No | Pounds including VAT, before delivery. | |
| basket_id | No | Present only when the host did not identify the user: pass it to later basket tools. | |
| unavailable | No | Items teas.co.uk could not add. | |
| checkout_url | No | Secure link that opens this basket at teas.co.uk checkout. | |
| how_it_works | No | ||
| subtotal_text | Yes | ||
| link_valid_for | No |