Approve and order

cart_approve

Ask the buyer to approve the cart at its current total.

View as Markdown

This tool asks; it does not approve. The answer comes from the buyer, outside the assistant's conversation. See Approval.

TypeWrite: changes a cart or an order
Needs a cart the buyer approvedNo
Moves moneyNo
Tool description (what the assistant sees)
Requests the buyer's approval for a cart at its current total; the approval itself can only come from the buyer. Depending on the client, the buyer answers in a confirmation box the client shows, in an approval box XEKTA draws inside the chat, or on a secure XEKTA web page with their own sign-in (always used for totals over $200). Returns status approved, refused, approval_requested (with approval_url) or approval_box_open. total_cents is checked against the cart's current total and a mismatch is rejected. fallback: "link" returns the web-page link instead of a box. Any later change to the cart clears the approval, and checkout is refused for a cart without one.

#Parameters

NameTypeRequiredDescription
cart_iduuidYesThe cart.
total_centsintegerYesThe cart's current total in cents, as read from cart_get. A mismatch is rejected.
fallbackstringNolink returns the approval page link instead of a box. Use it only when the buyer says they see no box.

#Notes

  • Read the returned status: approved, refused, approval_box_open, approval_requested, or confirm_in_assistant on assistants such as Meta Muse. Approval says what to do for each.
  • After refused, stop. Do not ask again for the same cart unless the buyer asks you to.

#What to call next

checkout_create, only after the status is approved.