Go to checkout
checkout_linkUse this when the customer is ready to buy what is in their teas.co.uk basket. basket_id picks the basket: leave it out on hosts that identify the customer, and otherwise pass the basket_id an earlier basket tool returned, so the link carries the basket the customer built. Each call makes a new link that works for 7 days on any device; any link opens the basket as it is when opened. There the customer signs in or creates an account, chooses delivery and pays. An empty basket returns an error asking for a product first. The assistant never sees payment details, and no order is placed until the customer pays on teas.co.uk. To buy specific products without the basket use checkout_session.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "checkout_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| basket_id | No | Only for hosts that do not identify the user: the basket_id returned by an earlier basket tool in this conversation. Leave it out otherwise. |
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. | |
| 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 |