The plumbing for one small paid product, already wired.
A runnable Cloudflare starter: a landing page, a paid page at /plus/?paid=1, a Stripe Payment Link hookup, and a pre-launch check that tells you whether the success URL will actually work.
One-time payment. Zip download straight after checkout.
What's in the zip
- A Wrangler project that runs locally.
wrangler.toml,src/worker.jsand apublic/folder. - Two pages. A public landing page and a paid page in
public/plus/. - A simple unlock rule. The paid page opens when the URL query is
paid=1, which is what you put on your Payment Link's success URL. - A pre-launch checklist script. It checks that the success URL returns 200, that
/plusredirects to/plus/, that no secrets are in the repo, and that there are no GitHub Actions workflows. - A receipt hook.
POST /api/receiptrecords a paid-success hit, and a small eval helper turns the checks into a pass/fail receipt. - A copy to-do list.
COPY-TODO.mdnames every placeholder string you still need to write.
How it works
- Unzip and run it. You need Node 20 or newer.
Opennpm test npm run preflight npm start # same checks, then serves http://127.0.0.1:8787/and/plus/?paid=1. Withoutpaid=1the paid page stays locked. - Make a Payment Link in Stripe. Set its success URL to
https://YOUR_DOMAIN/plus/?paid=1. The slash afterplusmatters, and the preflight fails without it. Put the link inpublic/config.jsasPAYMENT_LINK_URL. - Write your copy and deploy. The kit is built for Cloudflare Workers or Pages. Deploying, pricing and the words on the page are yours to do.
Wrangler is optional. It's only used for npm run dev, if you want the Cloudflare runtime locally.
Who it's for
Solo developers who want to sell one small thing, a zip, a tool, a page, and would rather not build an app around it. If you already know what you're selling and want the landing page, paid page and Stripe redirect to work the first time, this covers the fiddly part.
Who it's not for: anyone who needs accounts, licence keys or server-side payment verification out of the box. The unlock is a URL query, nothing more.
Questions
Is the paid page actually protected?
Lightly. It opens for any visitor whose URL has paid=1, so someone who knows the URL can open it. That's a fair trade for a low-priced product with no backend. The README points to the next step if you want it, verifying Checkout Sessions in the worker with a secret set through npx wrangler secret put, but that code is not in the kit.
What do I need to run it?
Node 20 or newer. To go live you'll also need your own Stripe and Cloudflare accounts.
Does it deploy for me?
No. It's a starter that runs on your machine. There's no live buy button until you set PAYMENT_LINK_URL, and deploying is a step you take yourself.
Can I see the pattern working?
This page sells through a Stripe Payment Link. After payment, Stripe sends you back with a checkout session, and the zip is released only once Stripe confirms that session is paid for this product. The kit you download still uses the simpler /plus/?paid=1 success URL unless you add session verification yourself.
Reply to your Stripe receipt within 14 days for a refund.