Getting Started with StackBE

Build subscriptions, billing, and entitlements into your app without rebuilding infrastructure.

StackBE is an API-first billing and subscription platform designed for developers shipping real products. Whether you're launching one serious app or experimenting with ten, StackBE gives you a consistent backend for payments, access control, and customer management.

This guide gets you from zero to your first checkout.

What StackBE Is (and Isn't)

StackBE is:

  • A multi-tenant billing backend
  • Subscription and entitlement management
  • Hosted checkout + API control
  • Designed to run your product and run itself

StackBE is not:

  • A website builder
  • A UI-heavy dashboard tool
  • A Stripe wrapper with opinions you can't escape

If you're comfortable making API calls, you're in the right place.

Core Concepts (Quick Mental Model)

Before touching code, it helps to understand how StackBE thinks.

TenantAn organization. Usually one company or solo builder.
AppA product owned by a tenant. One tenant can have many apps.
CustomerAn end user of an app. Customers belong to apps, not tenants.
Product → Plan → SubscriptionProducts define what you sell. Plans define pricing and entitlements. Subscriptions link customers to plans.

You'll work mostly at the App level.

Step 1: Create Your Tenant

If you don't already have one, create a tenant:

http
POST /v1/tenants

This represents your organization inside StackBE. You'll use the returned tenantId in future requests.

Step 2: Create an App

Each product you build gets its own app.

http
POST /v1/apps

Apps isolate customers, subscriptions, webhooks, and API keys. Most teams start with one app and add more later.

Step 3: Generate an API Key

Create an API key scoped to your app:

http
POST /v1/apps/{appId}/api-keys

Save the key securely. It's shown once. All StackBE requests require this key.

Step 4: Define Products and Plans

Create a product:

http
POST /v1/products

Then add one or more plans:

http
POST /v1/plans

Plans define:

  • Price
  • Billing interval
  • Trial length
  • Entitlements

You can change plans later without breaking customers.

Step 5: Connect a Payment Gateway

For Stripe:

http
POST /v1/gateways/stripe

StackBE supports multiple gateways per tenant. Each app can route billing independently.

Step 6: Create a Checkout Session

To subscribe a customer:

http
POST /v1/checkout/session

StackBE returns a hosted checkout URL. Redirect the customer. That's it. No client-side billing logic required.

Step 7: Handle the Result

Once checkout completes:

  • StackBE creates the customer
  • Creates the subscription
  • Fires webhooks
  • Updates entitlements

You can query status anytime:

http
GET /v1/subscriptions/current

Step 8: Gate Features with Entitlements

Use one call to check access:

http
GET /v1/entitlements

StackBE handles:

  • Trials
  • Cancellations
  • Downgrades
  • Grace periods

You decide what features map to each plan.

What to Build Next

Common next steps:

  • Add webhooks for sync
  • Set up magic-link auth
  • Create an early access waitlist
  • Integrate customer portal actions

All of these are optional. StackBE works incrementally.

Production Ready by Default

StackBE includes:

  • Audit logs
  • Webhook retries
  • Rate limiting
  • API key scoping
  • Multi-gateway safety

You don't need to "outgrow" it.

Where to Go Next