How do I add subscriptions to a Flutter app with RevenueCat?
Create products in both stores, group them into a RevenueCat offering, install purchases_flutter, present a paywall that calls Purchases.purchasePackage(), and gate premium features on the entitlement returned by Purchases.getCustomerInfo().
Why it matters
Native in-app purchase is verbose and platform-specific. RevenueCat abstracts both stores, handles restore, and reports MRR — the standard for Flutter subscriptions in 2026.
How to do it
-
Create products in the stores
App Store Connect: In-App Purchases → Auto-Renewable Subscription. Play Console: Monetization → Subscriptions.
-
Add them to RevenueCat
Products in RevenueCat mirror store product IDs. Group them into offerings (e.g., "default"). Attach an entitlement (e.g., "pro").
-
Install the SDK
flutter pub add purchases_flutterthen configure with your public SDK keys. -
Identify the user
await Purchases.logIn(userId);where userId is your Supabase or Firebase auth uid. -
Present the paywall
Fetch offerings, show the packages, call
Purchases.purchasePackage(pkg). -
Gate features on entitlement
final info = await Purchases.getCustomerInfo(); final pro = info.entitlements.all['pro']?.isActive == true;
Frequently asked
- Do I need a backend?
- Not strictly. RevenueCat validates receipts. If you want server-side entitlement (e.g., an API that checks pro status), use webhooks + your own subscriptions table.
- How do I test purchases before shipping?
- App Store: Sandbox tester accounts. Play: internal testing track + test license.