The store's assistant at Lumen Home, on Stripe

Run the fictional Lumen Home store with its own shopping assistant and operations assistant, walk a conversation from a search to a Stripe test payment, and see the assistant read the order back.

What this run is

The store's assistant is the blueprint's shopping agent, running inside Lumen Home's storefront. It searches the catalog, builds the cart, shows the tender card, and stages the checkout; Stripe takes the payment on its own page. A second assistant, the blueprint's merchant agent, sits in the operations portal and answers from the processor's numbers. This folder starts both from one script.

Running it

Set up once from the repository root with ./setup.sh, copy platforms/stripe/.env.example to platforms/stripe/.env, and put ANTHROPIC_API_KEY in it (one KEY=value per line, read literally, so a key needs no quoting or escaping). STRIPE_SECRET_KEY is optional; without it the run is simulated.

platforms/stripe/first-party/run.sh

The script prints whether Stripe is live or simulated, then starts the merchant API on 8016, the storefront on 3016, and the portal on 3116. --all is the default. Two other forms exist.

platforms/stripe/first-party/run.sh --merchant

starts the API and the portal only, and

platforms/stripe/first-party/run.sh --api-only

starts the API alone.

Surface URL
Storefront, with the store's assistant http://localhost:3016
Operations portal, with the operations assistant http://localhost:3116
Merchant API (health, brand, hosted page, return leg, UCP, ACP, webhooks) http://localhost:8016

GET http://localhost:8016/api/brand reports gateway_mode, checkout_model, and the assistant's name (Lumen Home Assistant).

A scripted walkthrough

Open the storefront. The conversation below was the shape of the live run on 6 September 2026, on the hosted model.

  1. Ask for a product: "I need a table lamp under $80." The assistant searches and presents candidates; the catalog has a $22 kids' table lamp and a $54 LED desk lamp.
  2. Add it: "Add the $22 one." The cart panel updates and offers two links under the subtotal, "How can I pay?" and "Ask about this cart".
  3. Ask how to pay, or click "How can I pay?". The assistant calls the tender card, whose figures are authored by the server for this cart: the Lumen Home Card's 5% back, the demo user's $50 gift balance, Klarna's pay-in-4 split when the cart is above $35, Affirm above $150, and the Lumen Rewards points the order earns. The assistant's sentence points at the card and states none of the figures itself.
  4. Check out: "Set up checkout." The assistant stages the cart with Stripe. With a live key this creates a Checkout Session in Stripe's test mode; the model sees only that the checkout is staged. The cart panel's button now reads "Pay securely on Stripe".
  5. Pay on Stripe's page. The button opens Stripe Checkout. Use the test card 4242 4242 4242 4242, any future expiry, any CVC and postal code.
  6. Return. Stripe sends the browser to http://localhost:8016/checkout/return?session_id=…. That page reads the session from Stripe, records the order, queues a note for the assistant, and shows "Payment received" with a link back to the store. Meanwhile the cart panel polls checkout_status_url on the merchant API, so the store notices the payment without a reload.
  7. Ask about the order: "Did my payment go through?" The assistant answers from the queued note and the order list. The note reads, in part:
Customer completed checkout cko_… on the hosted payment page (processor page) with card; order ORD-… was placed and USD 22.00 captured (transaction …). The cart is now an order.

In the Stripe Dashboard (test mode) the Checkout Session and its PaymentIntent appear under Payments.

What the simulated mode shows instead

Without STRIPE_SECRET_KEY, steps 1 to 4 are identical and the button opens a local page at http://localhost:8016/checkout/cko_…, served by the merchant API in place of Stripe Checkout. It is headed "Lumen Home, Secure checkout · Stripe", lists the order, and under "How would you like to pay?" shows one button per tender with the same figures as the tender card. Pressing a tender completes a demo payment; the storefront's poll sees completed, and step 7 works the same way. The page carries a line saying that the assistant which staged the checkout never sees this page and cannot press its buttons, which is the point of the design.

The server model, paid end to end

With CHECKOUT_MODEL=server in platforms/stripe/.env, the button at step 4 reads "Continue to checkout" and opens the merchant's own page at http://localhost:8016/store/checkout/pi_…, marked "Server-side API". Pressing "Credit or debit card" makes the merchant's server confirm the PaymentIntent through Stripe's API with Stripe's test payment method. The page reloads to "Paid with card. Order ORD-… · transaction pi_…", the Dashboard shows the PaymentIntent as succeeded, and step 7 answers with the order. This ran live on 8 September 2026 for the USD 22.00 lamp.

The operations assistant in the portal

Open http://localhost:3116. The home view carries a panel titled "Money · Stripe" with four tiles: Settled, Authorization rate, Agent-initiated, and Open disputes, each with an "ask the assistant" action, plus the settlement rows. The figures come from the processor through the same gateway the storefront uses; on the simulated gateway they are deterministic, on a live key they come from Stripe's PaymentIntents, payouts, and disputes.

Ask the operations assistant, in the panel on the right: "How are payments looking this week?", "Where is Friday's money?", "Which tender carries the most disputes?", or "Do agent-initiated orders dispute more than the rest?". Under the hood it reads the payments block of the merchant context, query_metrics under the names settled_volume, auth_rate, dispute_rate, chargebacks, agent_initiated_share, and tender_mix:<tender>, open disputes as order issues with their deadlines, and three SQL tables (transactions, settlements, disputes) for joins. The skill that governs its answers is psp_commerce/skills/merchant/payments-operations/SKILL.md; responding to a dispute or issuing a refund is described as the next step in Stripe's dashboard and never performed here.

Stopping

Ctrl-C in the terminal stops the API and both web apps. If a later start says port 8016 is busy, a previous run is still up; stop it before starting again.