Adapty (subscription management)

Food Truck Nerdz uses Adapty as its subscription management platform (sometimes called in-app subscription infrastructure). Adapty answers “does this user have paid access?” across App Store, Google Play, and Stripe web checkouts.

Business memberships (owner / manager / staff in Convex) are tenant roles, not paid plans. Do not confuse businessMemberships with Adapty access levels.

What we use Adapty for

  • Receipt validation and subscription lifecycle on iOS / Android

  • A single access level (default id: premium) mapped from store products and Stripe prices

  • Syncing web Stripe purchases into the same mobile profile via customer_user_id

  • Paywall experiments later (Adapty’s growth tooling), without rewriting billing

Flutter setup (ftn-app)

  1. Add adapty_flutter (already in pubspec.yaml).

  2. Create an app in the Adapty dashboard; copy the Public SDK Key.

  3. Create access level premium (or change AdaptyService.accessLevelId to match).

  4. Run with:

flutter run \
  --dart-define=API_BASE_URL=https://your.ftn.host \
  --dart-define=ADAPTY_PUBLIC_SDK_KEY=public_live_...

On sign-in, AuthController calls Adapty().identify(user.id) so the Better Auth / Convex user id is the shared customer id.

Web / Stripe

When you add Stripe Checkout for paid plans on ftn-site:

  1. Install Adapty’s Stripe app and connect the account (see Adapty Stripe docs).

  2. Put the same Better Auth user id in Checkout Session metadata as customer_user_id.

  3. For one-time payments, enable Stripe invoice_creation so Adapty receives invoice events.

  4. Map Stripe products to the premium access level in Adapty.

Helper notes live in the website docs: Subscription management (Adapty).

What Adapty does not replace

  • Better Auth sessions

  • Convex business memberships

  • Square POS (vendor catalog / payments)

  • Microsoft Store / Partner Center (grant access via Adapty server API if needed later)