Skip to content

BillStack Docs

Move billing, checkout, referrals, and subscription ownership out of your product app.

BillStack is a project-scoped billing layer for SaaS platforms. Your app keeps product identity and authorization. BillStack owns payment provider configuration, checkout creation, customer billing portal sessions, invoices, referral tracking, and entitlement calculation.

Use this documentation when you want one billing system to support multiple products without copying Stripe, Razorpay, affiliate, and admin-dashboard code into every app.

What BillStack owns

  • Provider credentials and webhook handling for Stripe and Razorpay.
  • Project-scoped products, tiers, prices, lifetime deals, and payment links.
  • Customer records keyed to your app user through externalId.
  • Logged-in checkout sessions and anonymous public payment links.
  • Referral codes, referral application, stats, and reward lifecycle.
  • Entitlement snapshots your app can read and cache.
  • Billing dashboard and customer portal links.

What your app still owns

  • Authentication and session handling.
  • The app user ID used as externalId.
  • Product UX such as pricing buttons, account pages, and upgrade CTAs.
  • Authorization gates that read BillStack entitlements.
  • Success and cancel pages after checkout.

Standard flow

  1. Create a BillStack team.
  2. Create one project for each SaaS product.
  3. Configure providers, products, tiers, prices, and referrals in BillStack.
  4. Generate a private API key for server-to-server calls.
  5. Optionally generate a publishable key for public pricing and payment-link reads.
  6. Replace local Stripe, Razorpay, and affiliate calls with BillStack API calls.
  7. Read entitlements from BillStack and keep only a small cache in your app.

v2 is recommended; legacy (v1) is frozen. Build new integrations on the provider-neutral v2 API (BillStackV2Client from @billstack/sdk/v2, 0.7.0 or later). The Stripe-first legacy API stays supported for integrations that already call it, but gets no new features. Legacy pages carry the legacy- prefix in their address.

Start with the quickstart, then add the integration guides that match your product.

All guides and API references