prepare_checkout
Build the buyer’s checkout link with optional prefill of the name, phone, email and address the buyer gave you. Use it only when the buyer asks for prefill and understands that anyone with the link can read the details. By default, give the buyer the checkoutUrl from quote_basket so they can enter their contact details on the website. The server does not store or log buyer details: they exist only inside the returned link, which is not encrypted, so share it only with the buyer. Creates NO order. The buyer opens the link, reviews or corrects details, accepts terms and personally confirms. Card payment link follows by WhatsApp. A basket with blockers is refused with the same blockers and amounts quote_basket reports. Both basket tools (quote_basket, prepare_checkout): Required on every call: country (AE), emirate (buyer-selected destination) and items (the complete basket). Each item requires id and qty. Ask the buyer for any missing destination or quantity before calling; use search_products to resolve exact orderable product IDs. Never guess missing values. For Research Use Only. This research-use-only catalogue is for buyers 21+ years of age and is supplied for research purposes only. Not for human or veterinary use. Reading replies: a refusal has isError true with error, message, field and nextAction (plus blockers, unavailableItems or remainingItems when they apply). A priced basket that cannot be ordered yet is not an error: it has readyForReview false and a blockers list with the amounts and a nextAction. catalogExpiresAt is this server’s cache clock, not a deadline: a checkout link does not expire and the order page rechecks stock and prices when the buyer opens it. Send these fields inside tools/call params.arguments. Both basket tools are stateless: send the complete basket again, combining duplicate IDs. Do not send prices, totals, consent or approval flags. For INVALID_ARGUMENTS, check missingFields and invalidFields when present. Follow nextAction and resend the complete corrected basket. Dubai and qty 1 are examples, not defaults; replace them with the buyer-selected emirate and quantity, and replace PRODUCT_ID_FROM_SEARCH with an orderable id from search. No cart, session or quote ID is accepted. Buyer prefill is optional and must be nested inside buyer. Example arguments: {"country":"AE","emirate":"Dubai","items":[{"id":"PRODUCT_ID_FROM_SEARCH","qty":1}]}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"country": "<country>",
"emirate": "<emirate>",
"items": "<items>"
},
"name": "prepare_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buyer | No | Optional buyer-supplied prefill, accepted only by prepare_checkout. Omit if not supplied. No payment, consent or approval fields. The server does not store or log these details; they exist only inside the returned link, which is not encrypted, so share it only with the buyer. | |
| items | Yes | Required COMPLETE desired basket of 1–20 distinct variant IDs. Combine the same ID into one line; send the entire updated basket on every call. | |
| country | Yes | Required delivery country code: AE means United Arab Emirates. | |
| emirate | Yes | Required buyer-selected destination. Use an exact listed emirate; ask the buyer if unknown, never assume Dubai. | |
| promoCode | No | Optional buyer-supplied promotion code, up to 24 letters or digits. Omit when absent; do not invent one. |