Prepare checkout (quote)
prepare_checkoutValidate items, stock, address and compute the exact total (auto vouchers + free shipping). Returns a summary and a quote_token valid 30 minutes. Does NOT create an order.
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": {
"items": "<items>",
"customer": "<customer>",
"shipping_address": "<shipping_address>"
},
"name": "prepare_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional note for the shop | |
| items | Yes | ||
| customer | Yes | ||
| gift_sku | No | SKU of the free gift the user picked, when the quote's giftOffer says eligible | |
| voucher_codes | No | Discount codes the user has (automatic vouchers are applied anyway; invalid codes are reported, not applied) | |
| payment_method | No | cod = cash on delivery · bank = bank transfer QR · vnpay = VNPAY payment link | cod |
| shipping_method | No | standard = free nationwide · express = same-day Grab, TP.HCM only (send lat/lng), fee shown in the quote | standard |
| shipping_address | Yes |