Subscription management (Adapty)

This site authenticates users with Better Auth and scopes tenant data with Convex business memberships. Paid product access is a different concern: we use Adapty as the subscription management platform so App Store, Google Play, and Stripe web purchases share one access check.

For industry context and comparisons (Adapty vs RevenueCat vs building it yourself), see the Dev-Centr architecture note Subscription management platforms (path may vary until the docs playbook is rebuilt).

Terminology

Term Meaning here

Subscription management platform

Service that validates store receipts, tracks renewals/refunds, and exposes access levels (Adapty) or entitlements (RevenueCat)

Access level / entitlement

Logical product access (e.g. premium), not a raw store SKU

Business membership

Team role on a food-truck business (owner / manager / staff) — not a paid plan

Stripe Customer Portal

Hosted UI for Stripe-only invoices and payment methods — does not show App Store billing

Integration checklist

  1. Create an Adapty app; define access level premium.

  2. Wire ftn-app with --dart-define=ADAPTY_PUBLIC_SDK_KEY=… (see mobile Adapty docs).

  3. Identify Adapty with the Better Auth user id after login.

  4. When Stripe Checkout exists: set metadata customer_user_id to that user id; connect Adapty’s Stripe integration.

  5. Gate premium UI/API features on Adapty access (or a server mirror of it), not on businessMemberships alone.

Environment variables

Documented on Environment variables:

  • ADAPTY_PUBLIC_SDK_KEY — Flutter / any client that activates the SDK (public key only)

  • Future server secrets only if you call Adapty’s server API (never ship the secret key to browsers)

Out of scope