TL;DR #
The fastest way to get your own online store out of an agent is to start from one that already takes payments. We used floo's storefront template, one prompt to Claude Code, and a single Stripe key, and ended up with a store with a cart, Stripe Checkout, shipping options and customer accounts, plus an API our agent used to ship the order.
- The only secret you set is your Stripe key. The store wires up its own webhook every time it deploys.
- Card numbers stay with Stripe. An order counts as paid only once Stripe's signed webhook confirms it.
- After launch you run the store from its owner page at
/admin, or let your agent do the same work through the store's API. - Everything quoted below came from a real run on December 2 and 3, 2026, against a test store called
storefront-checkin Stripe test mode.
Ask an agent to build "my own online store" and you'll usually get one of two answers. Either it sends you to a hosted store builder, or it starts writing a shop from an empty folder and leaves the payments, webhooks and hosting for you to figure out. There's a middle path, and it's the one this post walks through. You start from a store that already works, deploy it with one prompt, and let your agent change whatever you want from there.
We built it, bought from it with a test card, and fixed the things that broke along the way. Those fixes are in here too, because they're the parts you'd otherwise run into yourself.
What are you building? #
A small shop. People browse, add things to a cart, and pay on Stripe's checkout page. They can create an account to see past orders, or check out as a guest. Behind the scenes, you (or an agent) pick up paid orders and mark them shipped.
shopper -> floo gateway (public) -> Next.js store -> Postgres
|-> Stripe Checkout (card, shipping, tax)
Stripe -> /webhooks/stripe (signed) -> order paid, stock down, cart emptied
owner -> floo gateway (floo sign-in) -> /admin
agent -> floo gateway (app API key) -> /api/orders, /api/products
Products, carts and orders live in the store's own Postgres database, and product photos go in a storage bucket that floo sets up for each environment. Stripe takes care of the money. floo runs everything else, including shopper sign-in.
Step 1: Deploy with one prompt #
Paste this into Claude Code, Codex or Cursor:
Deploy the template at https://github.com/getfloo/storefront-template on floo for me.
Use my existing floo org. If you cannot run commands here, guide me through them
one at a time. Follow https://getfloo.com/agents.md to create a floo-hosted project,
replace its starter code with this template's files (keep the project's [app] name
in floo.app.toml), push, and give me the dev URL. The deploy stops on
STRIPE_SECRET_KEY: have me copy my Stripe test-mode secret key and set it with
`floo env set STRIPE_SECRET_KEY --stdin`, never pasting it to you, then redeploy.
Then walk me through a test purchase with Stripe's test card.
Don't worry when the first deploy fails. It's supposed to. The template marks the Stripe key as required, which means a store can't go live before it's able to take payments:
Required config is missing
Required configuration is missing.
Add the missing config field and retry the deploy.
Step 2: Set your Stripe key #
Switch the Stripe Dashboard to test mode, copy the secret key, and set it from your own terminal:
floo env set STRIPE_SECRET_KEY --stdin --app storefront-check
floo deploy --rebuild --app storefront-check
With --stdin, you type the key into a hidden prompt, so it never shows up in the chat or in your agent's transcript. Production gets its own live key later, with --env prod. Test and live keys never share an environment.
When the rebuild runs, the store sets up its Stripe webhook by itself:
Migration completed successfully.
Stripe webhook: created we_1UiQ… for https://storefront-check.getfloo.app/webhooks/stripe.
It didn't always work this way. On our first try we created the webhook by hand in Stripe, which meant answering three questions most store owners have never thought about (your account or connected accounts, snapshot or thin payloads, which API version). Then we pasted in the wrong URL. The test purchase went through on Stripe's side, but the order sat at "pending" because the confirmation was going to an address with nothing behind it.
So now the store handles it. Each deploy makes sure there's exactly one webhook pointed at the store's current address, with the events and API version its code expects. If you add a custom domain later, the next deploy moves the webhook over. If Stripe disables it after a run of failed deliveries, the next deploy turns it back on. Deploying a second time changed nothing, which is what you'd want:
Stripe webhook: we_1UiQ… sends to https://storefront-check.getfloo.app/webhooks/stripe.
Step 3: Add products and photos #
You don't start with an empty shop. Outside production, each deploy adds six sample products while the catalog is empty, so dev has something to buy right away. Production starts empty.
Your own products go in through the owner page at /admin. You're a member of the app, so floo signs you in there. Each product gets a form for its name, price, stock and photo, plus a box that takes it out of the shop, and there's a form at the bottom for adding a new one. Shoppers aren't members of the app, so they never get past floo's sign-in page.
Photos land in a private bucket, and the store serves them itself with a long cache. We uploaded a PNG and got the same bytes back with cache-control: public, max-age=31536000, immutable. The store turned down an SVG ( The photo must be one of image/jpeg, image/png, image/webp, image/avif.), since SVG files can carry scripts.
Our first version loaded the samples with a script you ran yourself, holding an app API key. That works from a terminal. A store started from a chat has no terminal, though, so the store now does it on deploy.
Step 4: Buy something #
Open the store, put something in the cart and check out. Before you leave the cart, it tells you what shipping will cost:
Shipping from $5.00, free over $50.00. You choose the method and pay on the next page, by Stripe.
On Stripe's page you'll see the items, the shipping options and the total. Pay with the test card 4242 4242 4242 4242, using any future date and any CVC. Here's our Express order as the API reported it afterwards:
{ "status": "paid", "shippingMethod": "Express", "shippingCents": 1500, "taxCents": 0, "totalCents": 3900 }
Stock for the item dropped by one and the cart emptied at the same moment the order was marked paid. All three changes happen together in one database transaction, and only for an order that's still pending. That matters because Stripe sometimes delivers the same event twice, and a duplicate doesn't double-count anything. If the shopper was signed in, the order shows up on their orders page with the shipping line and the total.
One more thing broke here. A shopper who signed up and entered the emailed code still wasn't signed in afterwards, so their order was saved as a guest's. That turned out to be deliberate on floo's side. Confirming a code shouldn't sign anyone in, because if someone else had registered your email first, you'd land in an account whose password they know. The store now signs the shopper in with the password they chose at sign-up, straight after the code is confirmed.
Step 5: Ship the order #
Paid orders sit at the top of /admin, each with its items, the shipping address and the method the shopper paid for. Mark one shipped and the shopper's orders page goes from "Paid, preparing to ship" to "Shipped". Ship the same order twice and the page tells you Order is fulfilled; only a paid order can be fulfilled.
An agent can do the same work through the store's API. Give it a key with the api scope:
floo apps consumers create fulfillment-agent --app storefront-check
floo apps keys create fulfillment-key --consumer fulfillment-agent --scope api --app storefront-check
export STORE_URL=https://storefront-check.getfloo.app STORE_API_KEY=<key>
curl -H "Authorization: Bearer $STORE_API_KEY" "$STORE_URL/api/orders?status=paid"
curl -X POST -H "Authorization: Bearer $STORE_API_KEY" "$STORE_URL/api/orders/$ORDER_ID/fulfill"
A retry on an order that already shipped gets a 409, so an agent can't send anything out twice. The whole API is documented at /api/openapi.json, generated from the same schemas the code validates against. A request with no key never reaches the store. floo's gateway answers it with a 401.
The owner page had one trap worth knowing about. Next.js accepts a server action posted to any path, including the public shop pages, so protecting the /admin route isn't enough on its own. Every owner action checks the floo identity itself. We posted the ship action to the shop's home page with forged identity headers: the gateway stripped the headers, the action refused, and the order stayed paid.
Step 6: Make it yours #
Most store-wide settings are in lib/store.ts. That's where you set the name, currency, countries you ship to, shipping rates, the free-shipping threshold, and whether to collect tax. Tax needs one extra step. Set up Stripe Tax in the Stripe Dashboard before you flip COLLECT_TAX to true, otherwise Stripe won't open the checkout page.
For anything else, ask your agent. We've tried prompts like these:
- "Take a tracking number when an order is fulfilled and show it on the customer's orders page."
- "Add product categories and a filter on the shop page."
- "Add a daily job that lists products with fewer than five left."
The repository's AGENTS.md tells the agent which rules not to break. Stripe only ever charges the prices saved on the order. Only the webhook can mark an order paid. Stock can't go below zero.
Step 7: Your domain and production #
To use your own domain, add it to floo.app.toml, deploy to production and publish the DNS records floo gives you. The next deploy moves everything over to it: the store's URL, its page titles and link previews, the sitemap, and the Stripe webhook.
Production runs as a separate copy with its own database, photo bucket and live Stripe key. Set the live key with floo env set STRIPE_SECRET_KEY --stdin --env prod. Then release with floo promote if floo hosts your repository, or with a GitHub release if it's your own. Pushing code never touches production by itself.
Start your store #
The template is a starting point that already takes payments. Whatever your store needs next, from discount codes to order emails, your agent builds on top of it in code you own. Start with the storefront template.
Talk to the founder about your store.
Frequently asked questions #
Can my agent build me an online store I own, instead of a store on a hosted builder?
Yes. Paste the deploy prompt from floo's storefront template into Claude Code, Codex or Cursor and it deploys a Next.js store with a catalog, a cart, Stripe Checkout, shipping rates, customer accounts and a Postgres database. The code lives in a repository floo hosts for you, or in your own GitHub repository if you prefer.
Which secrets do I have to set?
Only your Stripe secret key. You set it yourself with floo env set STRIPE_SECRET_KEY --stdin, so it never passes through the chat. The store creates its own Stripe webhook on each deploy and keeps the signing secret in its database.
How does the store handle shipping and sales tax?
Shoppers pick Standard or Express on Stripe's checkout page, and Standard is free over $50. You can change both in lib/store.ts. To charge sales tax, VAT or GST, set up Stripe Tax in the Stripe Dashboard and then turn on COLLECT_TAX. Every paid order records the shipping method, the shipping cost, the tax and the total charged.
How do I run the store after launch?
Open /admin on your store. floo signs you in, and you get the orders to ship with their addresses, and every product, where you change prices, stock and photos or add new ones. An agent can do the same through the store's API, with an app API key that has the api scope. The API is described at /api/openapi.json.