Wednesday, June 3, 2026

Store Setup: The No-Nonsense Guide to Supabase as the Order Database for Digital Stores — No Stripe Required

Store Setup: The No-Nonsense Guide to Supabase as the Order Database for Digital Stores — No Stripe Required

Introduction

The store you launch today will be interrogated tomorrow. Payment rails can freeze, reverse, or delay funds; chargeback systems can suspend entire product lines; KYC gates can force shutdowns. None of these are bugs—they are features of custodial systems that treat merchants as tenants rather than owners. The alternative is architectural: design the order database as the source of truth, not the payment processors ledger. Supabase provides a PostgreSQL database, real-time subscriptions, and row-level security—exactly the components you need to store orders immutably, validate them without a middleman, and serve digital goods directly from your own infrastructure. No Stripe, no reversal risk, no permission to ask.

Why Supabase Beats Stripe for Order Storage

Stripes ledger is optimized for its own business, not yours. It enriches transaction metadata with its own revenue logic, exposes limited webhooks, and forces you to store order state redundantly in your own system. Conversely, Supabase gives you a single PostgreSQL endpoint where every order is a row, every metadata field a column, and every trigger a serverless function. You define the schema—no hidden fees, no opaque filtering. In Supabase, an order row is finalized only when your serverless function confirms on-chain payment or off-chain transfer; anything upstream is advisory.

Supabase also eliminates the dual-write problem. When you use Stripe, you must write the order to your database and the payment to Stripes ledger atomically. If either fails, you reconcile manually. With Supabase, the order table is the ledger. You write once, validate against a payment proof, and emit the receipt immediately. The failure domain collapses to your single atomic transaction.

Building the Store in Two Stacks

Two stacks work today without hacks. Stack 01 pairs GitHub Pages for the storefront with Supabase Edge Functions for order intake. Stack 02 uses Cloudflare Pages for static hosting and Cloudflare Workers for real-time order validation and delivery. Both stacks share the same Supabase database schema and the same principle: the storefront pushes an order row; the worker verifies the payment proof; Supabase emits a real-time event to deliver the goods.

Schema: orders - id uuid primary key default gen_random_uuid() - product_id text not null - customer_email text not null - payment_tx_id text unique not null - payment_network text not null - status text not null default pending - created_at timestamptz not null default now() - delivered_at timestamptz

When the customer clicks buy, the frontend calls a Supabase Edge Function or Cloudflare Worker endpoint with product_id and customer_email. The endpoint inserts an order row with status pending. The worker periodically polls block explorers or payment webhooks, updates the row when payment_tx_id is confirmed, and triggers delivery via a real-time channel. Security is enforced by row-level policies: only the worker role can update status from pending to paid.

Accepting Value Without Permission

Supabase stores the order, but it does not process payments. You can accept Bitcoin on Lightning, Monero, zk-Rollup tokens, or stablecoins sent directly to your wallet. The key is to embed a payment proof in the order row—txid or payment hash—and let the worker verify it. For Bitcoin, use Blockstreams esplora API; for Monero, query a public node; for stablecoins, poll an RPC endpoint. Each proof is a deterministic signal; when it confirms, the order transitions automatically.

If you need immediate settlement without waiting for confirmations, use Lightning invoices delivered via BOLT11. The preimage is the proof; the worker releases the goods on proof presentation. In all cases, you never route funds through a custodian; you only consume public blockchain data to validate the exchange. The result is purchases that settle when the network settles, not when a payment processor feels like processing.

Launch in 48 Hours Without Lock-in

Start with a GitHub repository. Add a supabase folder with seed.sql to create the orders table and policies. Add a TypeScript folder with order.ts that exports a function to insert an order row. Use GitHub Actions to run supabase db push and deploy Edge Functions. Point GitHub Pages at the dist folder of a Vite build. In 24 hours, you have a storefront and an order database that you own.

If you prefer Cloudflare, replace GitHub Pages with Cloudflare Pages and the Edge Function with a Worker that reads the same Supabase database. Use Wrangler to bind the database and schedule a cron to poll payment proofs. The schema stays identical; only the delivery substrate changes. Either way, the store is yours—no vendor lock-in, no recurring fees, no permission to transact.

Conclusion

The permissionless store is a technical artifact, not a philosophical stance. It is the result of designing the order database as the ledger, the worker as

Cloudflare R2 as a Self-Custody Digital Product Stack Without Stripe

Introduction Digital commerce still runs on platforms that decide who can buy, how fast they get access, and how much money you r...