Skip to main content

Documentation

Overview

A native, opt-in subscription backend for Stackhouse that mirrors RevenueCat's core server surface.

Stackhouse-Billing (RevenueCat-style Subscriptions)

Stackhouse-Billing is a native, opt-in subscription backend for Stackhouse that mirrors RevenueCat's core server surface: apps, products, entitlements, offerings, customers, subscriptions, and lifecycle webhooks. It integrates Apple App Store, Google Play, and Stripe receipts/events out of the box.

Architecture

Rendering diagram…

Enabling

Set the environment variable STACKHOUSE_ENABLE_BILLING=1 before starting stackhouse. When enabled, the module:

  • runs idempotent migrations on boot (tables prefixed billing_)
  • mounts its router at /v1/billing
  • spawns a background outbound-webhook dispatcher

Optional environment fallbacks (overridable per-app via the admin API):

VariablePurpose
STACKHOUSE_BILLING_APPLE_SHARED_SECRETApple verifyReceipt shared secret
STACKHOUSE_BILLING_STRIPE_SIGNING_SECRETStripe webhook signing secret
STACKHOUSE_BILLING_GOOGLE_ACCESS_TOKENService-account OAuth token (androidpublisher scope)

What's in this section


Next: Data Model