Resource Directory Index
Select your target asset collection below to start decryption.
The Supabase Backend Without Stripe That Actually Lets You Keep Your Revenue

The Supabase Backend Without Stripe That Actually Lets You Keep Your Revenue

Introduction

Six months ago I spent 18 hours wrestling Stripe Connect refunds in the Philippines. The money left my bank account on day 1 but the refund took 7 days and the platform ate 3 % twice. I moved the same product to NOWPayments and the same payment hit my personal wallet on day 1 with zero platform fees. This guide strips out every dependency that can block funds or lock you in. You end up with Supabase as the single source of truth for orders, no Stripe Connect, no middleman wallets, and a deployment you can roll back in one click. Ive run this stack in co-working spaces from Da Nang to Chisinau; the only recurring bill is the $25/month Supabase Pro and $5/month Cloudflare Workers KV. Your revenue stays yours.

Choose the minimal stack before you write code

The difference between Stack 01 and Stack 02 is the frontend host and the edge worker that signs payment requests. Pick once and never touch the decision again.

Stack 01 - GitHub Pages → static site - Supabase → PostgreSQL + Auth + Storage - NOWPayments → crypto checkout - Google Apps Script → webhook processor that writes orders straight into Supabase

Stack 02 - Cloudflare Pages → static site - Supabase → same backend - NOWPayments → same payments - Cloudflare Worker → does the webhook parsing and Supabase insertion

Stack 01 is easier to audit because the Apps Script file lives in a single sheet you can diff. Stack 02 is faster once youve cached the Supabase client in the Worker; cold starts add 80 ms in Saigon but 12 ms in Prague. If you expect less than 50 orders per day, Stack 01 is freedom. Beyond that, the Workers included KV storage removes two Google API quotas youll inevitably hit at 3 a.m. in a Bangkok power outage.

Spin up Supabase in under 10 minutes

Run these commands in a fresh project:

npx supabase init --db-url postgres://postgres:yourpassword@db.yourref.supabase.co:5432/postgres npx supabase db push

The table definition you need is smaller than you think:

create table orders ( id uuid primary key default gen_random_uuid(), customer_email text not null, product_id text not null, crypto_address text not null, payment_id text not null unique, status text not null default 'pending', created_at timestamptz not null default now(), updated_at timestamptz not null default now() );

Add a realtime policy so the webhook worker can listen without polling:

alter publication supabase_realtime add table orders;

Migration complete. Supabase owns the data layer; you own the rows.

Frontend that does nothing but collect an email

GitHub Pages or Cloudflare Pages will serve the same HTML + JS bundle. The only job of the frontend is to send customer_email and product_id to NOWPayments checkout endpoint and return the crypto_address and payment_id.

const checkout = await fetch( https://api.nowpayments.io/v1/payment, { method: POST, headers: { x-api-key: YOUR_NOW_KEY }, body: JSON.stringify({ price_amount: 49, price_currency: USD, pay_currency: USDC, order_id: product_id, order_description: product_name, customer_email }) } ); const { payment_id, pay_address } = await checkout.json();

Store payment_id and pay_address in localStorage only until the page reloads; the webhook will mark it paid. No database write happens on the client side.

Webhook processor that writes orders without Stripe

NOWPayments sends a POST to the processor every time the status flips to finished. In Stack 01 the processor is a Google Apps Script bound to a Google Sheet; in Stack 02 its a Cloudflare Worker listening on /webhook.

Apps Script version:

function doPost(e) { const data = JSON.parse(e.postData.contents); if (data.status === finished) { const payload = { customer_email: data.customer_email, product_id: data.order_id, crypto_address: data.pay_address, payment_id: data.payment_id, status: paid }; const options = { method: POST, headers: { Authorization: Bearer YOUR_SUPABASE_KEY, Content-Type: application/json }, payload: JSON.stringify(payload) }; UrlFetchApp.fetch(https://your-ref.supabase.co/rest/v1/orders, options); } return ContentService.createTextOutput(JSON.stringify({ ok: true })); }

Worker version:

export default { async fetch(request, env) { if (request.method !== POST) return new Response(null, { status: 405 }); const data = await request.json(); if (data.status !== finished) return new Response(null, { status: 200 }); await env.SUPABASE.fetch( https://your-ref.supabase.co/rest/v1/orders, { method: POST, headers: { Authorization: Bearer ${env.SUPABASE_KEY}, apikey: ${env.SUPABASE_KEY}, 'Content-Type': application/json }, body: JSON.stringify({ customer_email: data.customer_email, product_id: data.order_id, crypto_address: data.pay_address, payment_id: data.payment_id, status: paid

⚡ Access Secure Mirror Link