> ## Documentation Index
> Fetch the complete documentation index at: https://getfloo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Build your own online store with your agent

> Deploy your own online store from floo's storefront template, with a cart, Stripe Checkout, shipping, customer accounts and an agent API.

Start from [`getfloo/storefront-template`](https://github.com/getfloo/storefront-template), a Next.js store your agent can change. It comes with:

* a product catalog and a cart in managed Postgres;
* Stripe Checkout with Standard and Express shipping, and Stripe Tax when you turn it on;
* customer accounts with order history, and guest checkout;
* product photos in [floo Storage](https://getfloo.com/docs/guides/cloud-storage.md);
* an API for agents to add products and ship orders.

Card numbers stay with Stripe. An order is paid only when Stripe's signed webhook says so.

## Agent prompt

Paste into Claude Code, Codex or Cursor:

```text theme={null}
Deploy the template at https://github.com/getfloo/storefront-template on floo for me.
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 set my Stripe test-mode secret key with
`floo env set STRIPE_SECRET_KEY --stdin`, never pasting it to you, then redeploy.
Then load the sample products and walk me through a test purchase.
```

## Set your Stripe key

The first deploy stops on `STRIPE_SECRET_KEY`. In the Stripe Dashboard, in test mode, copy the secret key and set it from your own terminal:

```bash theme={null}
floo env set STRIPE_SECRET_KEY --stdin --app <app>
floo deploy --rebuild --app <app>
```

You don't create a webhook. Each deploy creates or updates one Stripe webhook endpoint for the environment's URL and keeps its signing secret in the store's database. A [custom domain](https://getfloo.com/docs/guides/custom-domains.md) moves the webhook on the next deploy. A restricted key needs write access to Webhook Endpoints.

## Add products

Give your agent an [app API key](https://getfloo.com/docs/guides/app-api-keys.md) with the `api` scope and load the sample products through the store's API:

```bash theme={null}
floo apps consumers create catalog-agent --app <app>
floo apps keys create catalog-key --consumer catalog-agent --scope api --app <app>
STORE_URL=https://<your-dev-url> STORE_API_KEY=<key> npm run seed
```

Buy something with Stripe's test card `4242 4242 4242 4242`, any future date and any CVC.

## Run the store with an agent

The same key lists paid orders with their shipping address and method, marks them shipped, adds products and photos, and changes prices and stock. The store describes its API at `/api/openapi.json`. The template's [README](https://github.com/getfloo/storefront-template#run-the-store-with-an-agent) lists every route.

## Go live

Prod runs as a separate environment with its own database, photo bucket and Stripe key. Set your live key, then release:

```bash theme={null}
floo env set STRIPE_SECRET_KEY --stdin --env prod --app <app>
floo promote --app <app>
```

`floo promote` releases an app floo hosts. For an app on your own GitHub repository, create a GitHub release instead, as in [Deploy a customer-facing app](https://getfloo.com/docs/deploy/customer-app.md#deploy-to-dev-then-release-to-prod).

## Next steps

> [card] [Walkthrough](https://getfloo.com/blog/build-your-own-online-store-with-your-agent)
>
> Every step of a real run, from first deploy to a shipped order.

> [card] [Stripe payments](https://getfloo.com/docs/deploy/stripe-payments.md)
>
> Add Checkout to an app you already have.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.