create_checkout
Lock the quoted cart for purchase. Send the quote's version, its total as expected_total, a new idempotency_key and details (the buyer's name, email, phone and Singapore address; collect them first). coupon_code applies a code. Returns checkout_id, details_version, buyer_summary and a review link, valid 24 hours. Does not charge anything. Next: show the buyer buyer_summary, then prepare_payment.
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": {
"cart_id": "<cart_id>",
"version": "<version>",
"expected_total": "<expected_total>",
"idempotency_key": "<idempotency_key>"
},
"name": "create_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | cart_id from create_cart. | |
| details | No | Optional: the buyer's contact and Singapore delivery details, saved with the checkout (details_version 1) instead of a separate set_checkout_details call. The buyer still confirms them and the total before prepare_payment. | |
| version | Yes | The version from the quote_cart result you are checking out. | |
| use_credit | No | Use the signed-in customer's cashback credit (default true). | |
| coupon_code | No | A coupon code or a friend's referral code to apply; null removes both. quote_cart previews it; create_checkout applies it. | |
| guest_token | No | Private guest session token from create_cart. Retain for cart, checkout and purchase-status calls; no account login needed. | |
| account_token | No | Private account token from sign_in, after the customer gave you the code from their email. Lets quotes and checkout use their cashback credit, and opens their orders. | |
| expected_total | Yes | The total from that quote, in SGD cents. Checkout refuses if the total changed. | |
| idempotency_key | Yes | A new random key per purchase. Retry with the same key and exact input; never reuse it for a different purchase. |