I built a store that sells software to AI agents (and the storefront is a Cloudflare Worker)
说明与用途
作者使用 Cloudflare Workers、Stripe 和 Resend 构建了一个主权商店,向 AI 代理销售软件种子。系统处理结账、Webhook 验证、KV 存储和个人仓库以交付产品。
问题
Digital product stacks often bundle storefront, delivery, and customer relationship, taking a cut of sales. The author wanted a sovereign solution that keeps control over the storefront, checkout, and delivery while minimizing fees.
结果
The author successfully built a sovereign storefront that sells software seeds to AI agents, handling checkout, delivery, and customer access without platform fees. The system is live and has customers, but has not yet attracted traffic.
工作流
- 1. Buyer visits the storefront (Cloudflare Worker) and selects a product.
- 2. Checkout is performed via a plain Stripe payment link that includes the product code as metadata.
- 3. Stripe creates a payment intent and sends a webhook to a second Cloudflare Worker.
- 4. The webhook Worker verifies the Stripe signature, writes the buyer’s Customer Access Record to KV, and sends a magic link email via Resend.
- 5. The buyer clicks the magic link to access their personal vault portal.
- 6. The vault streams product files from R2 or grants private GitHub repo access, respecting per‑product quotas.
证据
The Grand Bazaar (thefortthatholds.xyz) was built the other way — sovereignty first:
Checkout: plain Stripe payment links. The trick is in the metadata: each link carries a product code (access ID), mirrored into the payment intent.
Delivery: a Stripe webhook lands on a second Worker, which verifies the signature, writes the buyer's Customer Access Record to KV, and emails a magic link (Resend) to a personal vault — a portal where everything the buyer owns lives, with per-product quotas.
The products are "Selfware seeds": the code behind several of them is free and MIT-licensed on GitHub (Fortmail, Beta Reader, Fort Kitchen). The paid seed is a single readable file — the route — that you hand to your own AI agent to set the system up on your own accounts.
- 记录日期: 2026-11-01T15:44:43.408Z