Introduction
Building a censorship-resistant store on the open web requires zero permission gateways. Stripe, PayPal, and their closed-loop cousins are not infrastructure; they are rented gatekeepers that can freeze, reverse, or disappear funds at will. A truly sovereign store runs on technology you control, deployed in hours, and survives network-level censorship. Cloudflare Pages is the fastest path to that sovereignty because it delivers globally distributed static assets through open protocols, while Cloudflare Workers can host the non-custodial payment logic that never touches a banks API. This guide shows the two complete stacks—Stack 01 for minimalists and Stack 02 for full edge logic—so you can launch a self-custodial storefront in 48 hours without asking any company for permission.
Stack 01: Ultra-light static store with external payments
Stack 01 uses Cloudflare Pages for hosting only: your HTML, CSS, and JavaScript are pushed via Git from a public or private repository. The storefront is a static site generator like Astro, Hugo, or Next.js static export. For payments, integrate NOWPayments open API: a customer clicks Checkout, the frontend calls NOWPayments directly, and the platform returns a self-custody crypto address. You never custody the funds; NOWPayments simply broadcasts the blockchain transaction. This stack requires zero server-side code, no environment variables for secrets, and no worker scripts. Total build time: 2–4 hours. Infrastructure cost: free tier of Cloudflare Pages plus NOWPayments standard fees. Failure mode: if NOWPayments changes its API or blocks your account, customers see a broken checkout button. You can swap to another non-custodial processor in minutes because the front end is just JSON and URLs.
Stack 02: Edge-based self-custody with Workers and open APIs
Stack 02 moves payment logic entirely to the edge so you never expose an API key. The Pages project still serves static files, but every checkout request is routed through a Cloudflare Worker bound to a Worker route. The worker constructs a Lightning invoice via LNURL or a Bitcoin address via an on-chain generator, both fetched from public open endpoints. The worker signs nothing; it only returns a cryptographic endpoint that the customers wallet can verify on-chain or via Lightning gossip. No custodial processor is involved after the first hop. The worker can also generate QR codes, enforce payment deadlines, and return custom receipt pages—all without touching a server you run. Build time: 6–12 hours. Infrastructure cost: free tier of Workers plus Cloudflare Pages. Because the worker reveals no keys and signs no transactions, your risk profile collapses to zero. If the open API you rely on disappears, you replace one URL in the Worker code and redeploy; minutes later the storefront is back.
Open standards over walled gardens
The architectural difference between these stacks and a Stripe-powered store is the absence of a centralized ledger that can modify state. In Stack 02, the ledger is the public blockchain or Lightning network; Cloudflare Workers merely translate HTTP requests into protocol-compliant messages. NOWPayments in Stack 01 is still a gateway, but it is a thin one: it accepts fiat or credit-card inputs and emits on-chain outputs, after which the custody chain ends at the customers self-custody wallet. Neither stack ever stores customer funds, never requests KYC for your business identity, and never asks you to trust a third-party balance. By routing commerce through open networks instead of gated APIs, you architect a storefront that cannot be remotely frozen, delayed, or recalled.
Launch checklist for the next 48 hours
1. Create a GitHub repository using the Astro or Hugo template for a product catalog. 2. Push the code to Cloudflare Pages via the Git integration; enable preview deployments. 3. Choose Stack 01 or 02 in the same repository; the only difference is the Worker script in /functions/checkout.js. 4. For Stack 01, add NOWPayments generated checkout link as a JSON blob in the product data file. 5. For Stack 02, write the Worker to accept POST from the store, call a public invoice endpoint, and return JSON with {invoice, network, expiry}. 6. Test the Worker locally with Wrangler, then publish it to Cloudflare. 7. Set a custom domain in Cloudflare Pages and enable Always Use HTTPS. 8. Announce the store on Nostr and IPFS mirrors so that if any CDN node is pressured, the content remains reachable. 9. Monitor invoices using public block explorers or Lightning gossip; zero balance sheets to reconcile.
No platform approval, no merchant account, no single point of failure. The store belongs to the customers keys, the website belongs to the open web, and the logic runs at the edge where the network itself enforces the rules.