Approve and order
checkout_create
Place the order for a cart the buyer has approved.
The only tool that creates an order. It refuses any cart without the buyer's current approval.
| Type | Write: changes a cart or an order |
| Needs a cart the buyer approved | Yes |
| Moves money | Places a hold on the buyer's saved card. It does not charge it. |
Tool description (what the assistant sees)
Places the order for a cart the buyer has approved. Refuses any cart without the buyer's current approval; approval cannot be passed as a field. Enforces one shop per cart, holds the stock, and places an authorization hold on the card the buyer saved with XEKTA — XEKTA charges it automatically when the buyer picks the order up (the shop enters their pickup code) — the buyer pays nothing at the counter — and the hold is released if the order is cancelled. Pickup is the default fulfillment: the response carries the pickup_code, or — when pickup_code_withheld is true — the buyer finds it in their own XEKTA account at pickup_code_url. The buyer reads the code to the shop at the counter.#Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | uuid | Yes | The approved cart. |
fulfillment_method | string | No | pickup (the default), merchant_delivery or third_party_courier. |
pickup_at | date-time | No | When the buyer plans to collect. Not accepted on restaurant carts: restaurant orders are prepared as soon as they are accepted. |
reservation_ttl_seconds | integer | No | How long the stock is held, up to 900 seconds. Left out: 300. |
#Notes
- Never tell the buyer the order is placed before this tool has returned one.
CATALOG_BUSYmeans the shop is updating its catalog. Retry in a moment with the same cart; the approval still stands.- A shop that does not answer within 10 minutes cancels the order automatically, and the hold is released.
#What to call next
user.orders.status to follow the order.