Approve and order

checkout_create

Place the order for a cart the buyer has approved.

View as Markdown

The only tool that creates an order. It refuses any cart without the buyer's current approval.

TypeWrite: changes a cart or an order
Needs a cart the buyer approvedYes
Moves moneyPlaces 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

NameTypeRequiredDescription
cart_iduuidYesThe approved cart.
fulfillment_methodstringNopickup (the default), merchant_delivery or third_party_courier.
pickup_atdate-timeNoWhen the buyer plans to collect. Not accepted on restaurant carts: restaurant orders are prepared as soon as they are accepted.
reservation_ttl_secondsintegerNoHow 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_BUSY means 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.