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. It puts exactly these items in a fresh basket at live prices and returns a secure link to pay on teas.co.uk; the basket built earlier is not used or changed. checkout_session holds items: each item needs an id from find_products and a quantity of 1 to 99, up to 20 items. offerId from the product feed is tried when an id is not found. Display fields (name, description, images, url, merchant_name, price) never change what is charged. Items that cannot be found are listed in unavailable and the rest go ahead; if none are found it returns an error. Nothing is charged until the customer pays on teas.co.uk. To check out the basket they built, use checkout_link.
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 |