Skip to main content
· 3 min readExpoTutorials
Malik Chohra

By Malik Chohra

Expo + RevenueCat Boilerplate, Add Subscriptions to Your React Native App in Minutes

Learn how to add RevenueCat subscriptions to your Expo React Native app. Step-by-step guide covering paywall screens, the useRevenueCat hook, sandbox testing, and production setup, pre-built in the AI Mobile Launcher boilerplate.

Expo + RevenueCat: the fastest path to subscription revenue

RevenueCat is the industry standard for mobile subscriptions. Combined with Expo, it gives you a cross-platform subscription layer that handles Apple StoreKit and Google Play Billing with a single unified API. AI Mobile Launcher's Standard tier ships with RevenueCat pre-configured, paywall screens, a typed hook, and revenue analytics included.

Setting up RevenueCat from scratch on a fresh Expo project takes roughly 8–12 hours: installing the SDK, configuring both iOS and Android entitlements, building the offering fetch logic, creating paywall UI, and wiring up purchase flows with proper error handling. This guide shows what that setup looks like inside a pre-built boilerplate, and how to get from zero to live subscriptions in under an hour.

Why RevenueCat over direct StoreKit?

Apple's StoreKit 2 and Google's Billing Library are powerful but deeply platform-specific. Using them directly means maintaining two separate implementations, reconciling purchase receipts manually, and building your own subscription-status tracking. RevenueCat abstracts all of that:

  • Single API for iOS + Android, one hook, both stores
  • Entitlement model, check if a user has "pro" access without knowing which product they bought
  • Server-side receipt validation, RevenueCat validates with Apple and Google so you don't have to
  • Analytics dashboard, MRR, churn, trial conversion all tracked automatically
  • Webhooks, forward subscription events to your backend (Supabase, Firebase, custom API)

How RevenueCat is integrated in the boilerplate

The AI Mobile Launcher Standard tier includes a complete RevenueCat integration. Here is the structure:

// features/monetization/hooks/useRevenueCat.ts
import Purchases, { PurchasesPackage } from 'react-native-purchases';
import { useEffect, useState } from 'react';

export const useRevenueCat = () => {
  const [offerings, setOfferings] = useState<PurchasesPackage[]>([]);
  const [isPro, setIsPro] = useState(false);
  const [isLoading, setIsLoading] = useState(true);

  useEffect(() => {
    const init = async () => {
      const customerInfo = await Purchases.getCustomerInfo();
      setIsPro(
        customerInfo.entitlements.active['pro'] !== undefined
      );
      const offerings = await Purchases.getOfferings();
      if (offerings.current) {
        setOfferings(offerings.current.availablePackages);
      }
      setIsLoading(false);
    };
    init();
  }, []);

  const purchase = async (pkg: PurchasesPackage) => {
    const { customerInfo } = await Purchases.purchasePackage(pkg);
    setIsPro(customerInfo.entitlements.active['pro'] !== undefined);
  };

  return { offerings, isPro, isLoading, purchase };
};

The hook abstracts the full RevenueCat lifecycle. Your paywall screen calls useRevenueCat(), renders the available packages, and calls purchase(pkg) when the user taps buy. The entitlement check (isPro) gates premium features anywhere in the app.

Step-by-step setup (starting from zero)

1. Install the SDK

npx expo install react-native-purchases

The boilerplate already has this dependency. If you're adding it to a new project, also run npx expo install expo-build-properties and configure the iOS minimum deployment target to 13.0 in your app.json.

2. Add your API keys

# .env
EXPO_PUBLIC_REVENUECAT_IOS_KEY=appl_xxxxxxxxxxxx
EXPO_PUBLIC_REVENUECAT_ANDROID_KEY=goog_xxxxxxxxxxxx

3. Initialize at app startup

// app/_layout.tsx (or App.tsx)
import Purchases from 'react-native-purchases';
import { Platform } from 'react-native';

const key = Platform.select({
  ios: process.env.EXPO_PUBLIC_REVENUECAT_IOS_KEY,
  android: process.env.EXPO_PUBLIC_REVENUECAT_ANDROID_KEY,
});

Purchases.configure({ apiKey: key! });

4. Create products and offerings in RevenueCat

In the RevenueCat dashboard, create a product for each subscription tier (e.g., Monthly, Annual), add them to an Offering, and give the Offering the identifier default. The boilerplate hook fetches offerings.current which maps to your default Offering automatically.

5. Test in sandbox

On iOS: use a Sandbox Apple ID (created in App Store Connect → Users → Sandbox Testers). On Android: add your test email as a licence tester in the Google Play Console. Sandbox purchases are free and don't charge your card.

Going to production checklist

  • Create products in App Store Connect and Google Play Console that match your RevenueCat product identifiers exactly
  • Enable "In-App Purchase" capability in your Xcode project (or in app.json via EAS)
  • Set up RevenueCat webhooks to sync subscription state to your backend database
  • Test the restore purchases flow, it's required for App Store review
  • Set up a RevenueCat Entitlement called pro and attach all products to it

If this setup looks like a lot of work, it's because it is, and that's exactly why the boilerplate exists. The Standard tier includes this entire integration pre-built, tested on both platforms, with a production-grade paywall screen and revenue analytics dashboard wired up.

Get the Standard boilerplate, RevenueCat pre-integrated →

Related Articles