Skip to content

๐Ÿ“Š Revenue Cat

Set up subscription management with RevenueCat for iOS and Android.

โš ๏ธ Don't want to use RevenueCat? If you don't need subscription management, you can remove RevenueCat by:

  1. Remove RevenueCatProvider from your app layout (app/_layout.tsx):
// Remove this wrapper:
// <RevenueCatProvider>
 
// Keep only:
<QueryClientProvider client={queryClient}>
  <ThemeProvider>
    <AuthProvider>
      <AppInitializer>
        {/* Your app content */}
      </AppInitializer>
    </AuthProvider>
  </ThemeProvider>
</QueryClientProvider>
  1. Skip this entire setup page

๐Ÿšจ CRITICAL WARNING: If you keep the RevenueCatProvider in your code but don't configure the RevenueCat environment variables, your app will stay stuck on the splash screen and won't load!

Prerequisites

โš ๏ธ IMPORTANT: Before setting up Revenue Cat, you must:

  1. Complete previous setup steps - Finish all configuration steps up to Sentry
  2. Add critical build variable - Add SENTRY_DISABLE_AUTO_UPLOAD=true to your Expo project environment variables on expo.dev to prevent build crashes
  3. Build your app first - Use eas build to create your app
  4. Submit to stores - Use eas submit to upload your app to App Store Connect and/or Google Play Console
  5. Create subscription products - You can create products immediately after submission

If you haven't built yet: Skip Revenue Cat for now and return after building.

Required for Revenue Cat setup:
  • iOS: App submitted and processed in App Store Connect + subscription products created
  • Android: App uploaded to Google Play Console (at least internal testing) + subscription products created

๐Ÿ”‘ Create Revenue Cat Account

  1. Go to revenuecat.com
  2. Create free account
  3. Create new project with your app name

๐ŸŽ iOS Configuration

Step 1: Create App Store Products

Before configuring Revenue Cat, create your subscription products:

  1. Go to App Store Connect
  2. Select your app (must be already submitted via EAS)
  3. Go to Features โ†’ In-App Purchases
  4. Create Subscription Group first:
    • Click + next to "Subscription Groups"
    • Reference Name: Premium Subscriptions
    • App Name: Your app name in App Store
  5. Create subscription in the group:
    • Click + inside your subscription group
    • Reference Name: Premium Monthly
    • Product ID: premium_monthly (remember this!)
    • Price: Set your pricing
    • Subscription Duration: 1 Month

Step 2: Add iOS App to RevenueCat

  1. Go to RevenueCat Dashboard
  2. Go to Platforms (make sure you're on the correct project)
  3. Click on Add app platform
  4. Select App Store
  5. Enter:
    • App Name: Your app name
    • App Bundle ID: com.yourcompany.yourapp
    • App Store Connect App-Specific Shared Secret:
      • Go to your app on App Store Connect
      • Under "General" โ†’ "App Information"
      • Scroll to "App-Specific Shared Secret" and click "Manage" and "Generate"
    • In-app purchase key configuration:
    • Apple Server to Server notification settings: Enable to receive notifications
    • App Store Connect API:

๐Ÿ’ก Note: You'll find your Public API Key at the bottom of the page. Copy it - you'll need it for your .env.local file as EXPO_PUBLIC_RC_IOS.


๐Ÿค– Android Configuration

Step 1: Create Google Play Products

  1. Go to Google Play Console
  2. Select your app
  3. Go to Monetization โ†’ Products โ†’ Subscriptions
  4. Click Create subscription
  5. Enter:
    • Product ID: premium_monthly (use same ID as iOS for consistency)
    • Name: Premium Monthly
    • Description: Monthly premium subscription
  6. Add a Base plan:
    • Base plan ID: monthly
    • Renewal type: Auto-renewing
    • Billing period: 1 Month
    • Price: Set your pricing
  7. Activate the subscription

โš ๏ธ Important: You must have uploaded at least one APK/AAB to Google Play Console (even in internal testing) before you can create subscription products.

Step 2: Create Google Cloud Service Account

RevenueCat needs a service account to communicate with Google Play.

2.1 Enable APIs

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Go to APIs & Services โ†’ Library
  4. Search and enable these APIs:
    • Google Play Android Developer API
    • Google Play Developer Reporting API

2.2 Create Service Account

  1. Go to APIs & Services โ†’ Credentials
  2. Click Create Credentials โ†’ Service Account
  3. Enter a name (e.g., "RevenueCat Service Account")
  4. Click Create and Continue
  5. Add these roles:
    • Pub/Sub Editor (for real-time notifications)
    • Monitoring Viewer
  6. Click Done

2.3 Generate JSON Key

  1. In Service Accounts, click on the account you just created
  2. Go to Keys tab
  3. Click Add Key โ†’ Create new key
  4. Select JSON format
  5. Click Create and download the file

โš ๏ธ Keep this JSON file safe! It contains credentials that give access to your Google Play data.

Step 3: Grant Access in Google Play Console

  1. Go to Google Play Console
  2. Click Users and permissions (in the left menu)
  3. Click Invite new users
  4. Enter the service account email (format: name@project-id.iam.gserviceaccount.com)
  5. Under App permissions, select your app
  6. Under Account permissions, enable:
    • โœ… View app information and download bulk reports (read-only)
    • โœ… View financial data, orders, and cancellation survey responses
    • โœ… Manage orders and subscriptions
  7. Click Invite user
  8. Accept the invitation (check "Active" status)

๐Ÿ’ก Activation Time: Google may take up to 36 hours to validate credentials.

Speed up activation: Go to your app โ†’ Monetization โ†’ Products โ†’ Edit any product description and save. This forces credential validation.

Step 4: Add Android App to RevenueCat

  1. Go to RevenueCat Dashboard
  2. Go to Platforms
  3. Click Add app platform โ†’ Google Play Store
  4. Enter:
    • App Name: Your app name
    • Package Name: com.yourcompany.yourapp (must match app.json)
  5. Upload the JSON service account key file
  6. Click Save

๐Ÿ’ก Note: You'll find your Public API Key at the bottom of the page. Copy it - you'll need it for your .env.local file as EXPO_PUBLIC_RC_ANDROID.


๐Ÿ“ฆ RevenueCat Product Configuration

These steps are shared for both iOS and Android.

Create an Entitlement

  1. Go to Product catalog โ†’ Entitlements
  2. Click New entitlement
  3. Enter:
    • Identifier: premium (or your preferred name)
    • Description: Premium access

๐Ÿ’ก Important: Remember your Entitlement Identifier - add it to .env.local as EXPO_PUBLIC_RC_SUBSCRIPTION_NAME.

Create Products

โš ๏ธ Important: Products in App Store Connect must have status "Ready to Submit" and Google Play subscriptions must be "Active" to be detected by RevenueCat.

  1. Go to Product catalog โ†’ Products
  2. Click New product
  3. Import Products (Recommended):
    • Click Import Products
    • Select iOS or Android platform
    • RevenueCat will find your subscriptions automatically
    • Click Import
  4. Link to Entitlement:
    • Select the imported product
    • Attach the entitlement you created

Repeat for both platforms to have iOS and Android products linked to the same entitlement.

Create an Offering

  1. Go to Product catalog โ†’ Offerings
  2. Click New offering
  3. Enter:
    • Identifier: default
    • Display Name: Default Offering
  4. Click Add Package
  5. Configure:
    • Identifier: Select duration (e.g., $rc_monthly)
    • Description: Monthly subscription
    • Products: Add both iOS and Android products
  6. Click Save

Create a Paywall

  1. Go to Paywalls
  2. Click New paywall
  3. Select a template
  4. On the right side, select your Offering
  5. Customize the paywall design
  6. Click Save

๐Ÿ”ง Environment Variables

Add these to your .env.local:

# RevenueCat iOS API Key
EXPO_PUBLIC_RC_IOS=appl_xxxxxxxxxxxx

# RevenueCat Android API Key
EXPO_PUBLIC_RC_ANDROID=goog_xxxxxxxxxxxx

# Entitlement identifier (must match RevenueCat)
EXPO_PUBLIC_RC_SUBSCRIPTION_NAME=premium

Platform Summary

VariablePlatformWhere to find
EXPO_PUBLIC_RC_IOSiOSRevenueCat โ†’ Platforms โ†’ App Store โ†’ Public API Key
EXPO_PUBLIC_RC_ANDROIDAndroidRevenueCat โ†’ Platforms โ†’ Google Play โ†’ Public API Key
EXPO_PUBLIC_RC_SUBSCRIPTION_NAMEBothRevenueCat โ†’ Product catalog โ†’ Entitlements โ†’ Identifier

๐Ÿšจ REMINDER: Configure ALL RevenueCat environment variables. If RevenueCatProvider is in your code without proper configuration, your app will stay stuck on the splash screen!

๐Ÿ’ก Production Builds: Add ALL environment variables to expo.dev โ†’ Your Project โ†’ Settings โ†’ Environment variables.


๐Ÿ” Troubleshooting

Android: Credentials not working

  1. Wait 36 hours - Google needs time to validate
  2. Force validation - Edit any product in Google Play Console and save
  3. Check permissions - Ensure service account has all required permissions
  4. Verify package name - Must match exactly in Google Play, RevenueCat, and app.json

Android: Products not showing

  1. Ensure you've uploaded at least one APK/AAB to Google Play
  2. Subscription must be Active (not Draft)
  3. Base plan must be configured with pricing

iOS: Products not showing

  1. Products must have status "Ready to Submit"
  2. All required metadata must be filled
  3. Subscription group must exist

App stuck on splash screen

  1. Check that all EXPO_PUBLIC_RC_* variables are set
  2. Verify API keys are correct (iOS starts with appl_, Android with goog_)
  3. Check RevenueCat dashboard for errors

๐ŸŽฏ Next Step

Continue to ๐Ÿ›ก๏ธ Sentry to set up error tracking.


Step 5/11 Complete โœ…

RevenueCat configured for iOS & Android!

๐Ÿ“š Additional Resources

Official Documentation