Skip to main content
Places and pays for the current cart at a linked merchant: it runs the spend gate, mints a one-time card sized to the cart total, and places the order. This is destructive, so confirm the cart and total with the user first.
Not advertised in tools/list by default — the buy tool covers this conversationally. Expert integrations can still call it by name.

Parameters

ParameterTypeRequiredDescription
merchantstringYesMerchant slug (for example doordash)
tip_centsnumberNoOptional tip in cents; added to the charge and the minted card size
delivery_timestringNoISO-8601 time to schedule delivery for; omit for ASAP
approval_idstringNoA previously issued spend approval id, if checkout returned needs_approval
idempotency_keystringNoA stable key for this purchase; reuse it on every retry so it never double-charges

Returns

On success, an order confirmation with the merchant order id, the charged total, and the last four digits of the one-time card (test-mode orders are flagged as no real charge). If a spend approval is required you get needs_approval with an approval id to retry with; if the spend gate blocks it you get denied with the reason. A pending result means the order is placed and only the payment is still confirming: call again with the same idempotency_key to re-check, never with a fresh one.

Example

{ "name": "buy_checkout", "arguments": { "merchant": "doordash", "tip_cents": 500, "idempotency_key": "9c2e6f4a-1b7d-4e2a-9a3f-5d8c0b1e2f37" } }