Handle carts and checkout flows (rates, totals, and cart creation). Use when running `stateset-checkout`, building carts, applying discounts, or completing checkout via MCP tools.
Run cart creation and checkout flows from start to finish.
email or customer_id.sku, quantity, and price.stateset-checkout ... or stateset "create cart for [email protected]"--apply.create_cart, add_cart_item, update_cart_item, remove_cart_item, set_cart_shipping_address, set_cart_payment, apply_cart_discount, get_shipping_rates, complete_checkout.get_shipping_rates — no --apply needed.create_cart, add_cart_item, update_cart_item, remove_cart_item, set_cart_shipping_address, set_cart_payment, apply_cart_discount, complete_checkout — requires --apply.stateset checkout create-cart --customer cust_123 --apply
stateset checkout add-item cart_123 --sku WIDGET-001 --qty 2 --apply
stateset checkout apply-discount cart_123 --coupon SAVE10 --apply
stateset checkout complete cart_123 --apply
Cart: Open -> Shipping Set -> Payment Set -> Completed (or Abandoned)
{"status":"completed","cart_id":"cart_123","order_number":"ORD-12345","subtotal":199.98,"tax":14.50,"shipping":9.99,"discount":20.00,"total":204.47}
complete_checkout.available quantity via commerce-inventory before adding.CART_INCOMPLETE: Required fields (shipping or payment) missing at checkout.COUPON_INVALID: Discount code is expired, exhausted, or does not meet cart minimum.ITEM_OUT_OF_STOCK: SKU quantity unavailable when completing checkout.