Documentation

Self-hosting PayCraft

PayCraft is fully self-hostable. The backend is Supabase (Postgres + Auth + Edge Functions); point the SDK at your own instance and you own the entire billing stack.

Architecture

Client App → PayCraft SDK → your Supabase (source of truth)
Payment Provider (Stripe / Razorpay) → Webhook → your Supabase

The app never talks to the payment provider directly — it only reads entitlement from Supabase, which provider webhooks keep in sync.

Point the SDK at your backend

PayCraft.initialize(
    apiKey  = "pk_live_YOUR_KEY_HERE",
    backend = PayCraftBackend.SelfHosted(
        supabaseUrl     = "https://billing.yourcompany.com",
        supabaseAnonKey = "eyJ…",
    ),
)

Deploy the backend

Full setup — compose file, Helm values, migrations, and webhook wiring — is in the reference docs.