Skip to main content
Mobile Launcher
First App Launch in 30 minutes

RevenueCat Integration

Implement in-app subscriptions and purchases in your Expo app

RevenueCat Integration for Expo

RevenueCat SDK is already installed and fully integrated into the boilerplate. This guide shows you how to configure your own RevenueCat project and connect it to the stores.

RevenueCat requires a development build. It will not work with Expo Go.

What's Included

  • Subscriptions: Monthly, Yearly, Lifetime plans
  • Entitlements: Unlock features based on purchase status
  • Paywalls: A/B test pricing pages
  • Cross-Platform: Unified receipt validation for iOS/Android

Step 1: Create Your RevenueCat Account

Sign Up for RevenueCat

  1. Go to app.revenuecat.com
  2. Click Sign Up and create your account (or sign in with GitHub/Google)
  3. Verify your email address if required

Create a New Project

  1. Click the + Create new project button in the Projects dropdown
  2. Enter your project name (e.g., "My App")
  3. Click Create

Every new project comes with a Test Store pre-configured, so you can start testing immediately without connecting to Apple or Google.


Step 2: Add Your Apps to RevenueCat

Add iOS App (App Store)

  1. In your RevenueCat project, go to Project Settings (gear icon) → Apps
  2. Click + New and select App Store
  3. Enter your Bundle ID, this must match the bundleIdentifier in your app.json
  4. Get your App Store Connect Shared Secret:
    • Go to App Store Connect → Your App
    • Click App Information (under General)
    • Scroll to App-Specific Shared SecretManage
    • Generate and copy the secret
  5. Paste the shared secret in RevenueCat
  6. Click Save

Add Android App (Google Play)

  1. Click + New and select Play Store
  2. Enter your Package Name, this must match the package in your app.json
  3. Set up Google Play Service Account:
    • Go to Google Cloud Console
    • Create or select a project
    • Go to IAM & AdminService Accounts
    • Click Create Service Account
    • Name it (e.g., "RevenueCat Service Account")
    • Grant Pub/Sub Admin role
    • Click Done
    • Click on the service account → KeysAdd KeyCreate new keyJSON
    • Download the JSON file
  4. In Google Play Console, add this service account:
    • Go to SetupAPI access
    • Click Link next to your Cloud project
    • Grant the service account Admin permissions
  5. Upload the JSON file to RevenueCat
  6. Click Save

Step 3: Create Products in App Store Connect (iOS)

Prerequisites

Before creating products, ensure in App Store Connect:

  • Paid Applications Agreement is signed (Agreements, Tax, and Banking)
  • Tax and Banking information is complete (status shows "Active")

Create a Subscription Group

  1. Go to App Store ConnectMy Apps → Select your app
  2. In the sidebar under Monetization, click Subscriptions
  3. Click + (Create Subscription Group)
  4. Enter a Reference Name (internal only, e.g., "Premium Subscriptions")
  5. Click Create

Add Subscription Products

  1. Click + next to your subscription group to add a product
  2. Enter:
    • Reference Name: Internal name (e.g., "Monthly Premium")
    • Product ID: Use a consistent scheme like yourapp_premium_monthly, yourapp_premium_yearly
    • Subscription Duration: Select from dropdown (1 Month, 1 Year, etc.)
  3. Click Create

Configure Pricing

  1. In your product, scroll to Subscription Prices
  2. Click + to add a price
  3. Select your base country/region
  4. Choose the price tier (e.g., $9.99 for monthly)
  5. Click Next to accept auto-generated regional prices (or customize)
  6. Click Confirm

Add Free Trial (Optional)

  1. In your product, scroll to Introductory Offers
  2. Click + to add an offer
  3. Configure:
    • Countries/Regions: Select all or specific
    • Offer Type: Free
    • Duration: e.g., 7 days
  4. Click Confirm

Add App Store Localization

  1. Scroll to App Store Information
  2. Click + next to localization
  3. Select your language
  4. Enter:
    • Subscription Display Name: User-visible name (e.g., "Premium Monthly")
    • Description: What users get with this subscription
  5. Click Save

Step 4: Create Products in Google Play Console (Android)

Create a Subscription

  1. Go to Google Play Console → Select your app
  2. Navigate to MonetizeProductsSubscriptions
  3. Click Create subscription
  4. Enter:
    • Product ID: Use the same ID as iOS (e.g., yourapp_premium_monthly)
    • Name: Internal reference name
  5. Click Create

Add a Base Plan

  1. In your subscription, click Add base plan
  2. Enter:
    • Base plan ID: e.g., monthly-autorenew
    • Renewal type: Auto-renewing
    • Billing period: 1 Month (match your iOS product)
  3. Add pricing:
    • Click Set prices
    • Set your default price and regional prices
  4. Click Save
  5. Click Activate to make the plan available

Add Free Trial Offer (Optional)

  1. In your base plan, click Add offer
  2. Select Free trial
  3. Configure:
    • Offer ID: e.g., free-trial-7days
    • Eligibility: New customers
    • Duration: 7 days (or match iOS)
  4. Click Save and Activate

Step 5: Configure RevenueCat Products & Entitlements

Create an Entitlement

Entitlements define what access users receive after purchase.

  1. In RevenueCat, go to Product CatalogEntitlements
  2. Click + New
  3. Enter an identifier: premium (or pro, plus, etc.)
  4. Add an optional description
  5. Click Create

Most apps only need one entitlement. Create multiple only if you have distinct access tiers (e.g., "Basic" and "Premium").

Add Products to RevenueCat

  1. Go to Product CatalogProducts
  2. Click + New
  3. Select the App (iOS or Android)
  4. Enter the Product Identifier exactly as it appears in App Store Connect or Google Play
  5. Click Create

Repeat for each product (Monthly, Yearly, etc.) for both platforms.

Attach Products to Entitlements

  1. Go to Product CatalogEntitlements
  2. Click on your entitlement (e.g., premium)
  3. Click Attach
  4. Select all products that should unlock this entitlement
  5. Click Add

Important: If you don't attach products to an entitlement, purchases won't unlock any features!

Create an Offering

Offerings group products for display in your paywall.

  1. Go to Product CatalogOfferings
  2. Click + New
  3. Enter an identifier: default
  4. Click Create

Add Packages:

  1. Click on your offering
  2. Click + New Package
  3. Select package type and attach products:
Package TypeProduct
Monthlyyourapp_premium_monthly
Annualyourapp_premium_yearly
Lifetimeyourapp_premium_lifetime (optional)
  1. Set as Current: Toggle ON for your default offering

Step 6: Get Your API Keys

Find Your Public API Keys

  1. In RevenueCat, go to Project Settings (gear icon)
  2. Click API Keys
  3. Copy the Public API Key for each platform:
    • iOS: Starts with appl_
    • Android: Starts with goog_

Configure Environment Variables

Add your keys to the .env file in your project root:

# RevenueCat API Keys EXPO_PUBLIC_REVENUECAT_APPLE_API_KEY=appl_xxxxxxxxxxxx EXPO_PUBLIC_REVENUECAT_GOOGLE_API_KEY=goog_xxxxxxxxxxxx

Step 7: Verify app.json Configuration

The boilerplate already has the RevenueCat plugin configured in app.json. Verify that your bundleIdentifier (iOS) and package (Android) match what you registered in RevenueCat and the app stores. The react-native-purchases plugin should already be listed in the plugins array.


Testing Purchases

iOS Sandbox Testing

Create Sandbox Tester

  1. Go to App Store ConnectUsers and Access
  2. Click Sandbox in the sidebar
  3. Click + to add a Sandbox Tester
  4. Enter a unique email (can be fake, but must be unique)
  5. Create a password and fill required fields
  6. Click Create

Test on Device

  1. On your iOS device, go to SettingsApp Store
  2. Scroll down and tap Sandbox Account
  3. Sign in with your sandbox tester credentials
  4. Make purchases in your app, you won't be charged

Sandbox subscription renewal times:

DurationSandbox Renewal
1 Week3 minutes
1 Month5 minutes
2 Months10 minutes
3 Months15 minutes
6 Months30 minutes
1 Year1 hour

Android Test Purchases

Add License Testers

  1. Go to Google Play Console
  2. Navigate to SetupLicense testing
  3. Add Gmail addresses of your testers
  4. Click Save

Test on Device

  • Testers can make purchases without being charged
  • Test subscriptions also renew faster (similar to iOS sandbox)
  • The tester must be signed into Google Play with the registered email

Using RevenueCat Test Store

For development without store setup:

  1. Create products in RevenueCat's Test Store instead of real stores
  2. Test Store purchases work in iOS SDK 5.43.0+ and Android SDK 9.9.0+
  3. Products behave like real purchases but don't require store configuration

Common Issues

IssueSolution
"Product not found"Verify product ID matches exactly between stores and RevenueCat
Entitlement not unlockingCheck product is attached to the correct entitlement in RevenueCat
Sandbox purchases failingEnsure sandbox email doesn't exist as a real Apple ID
Play Store purchases stuckVerify service account has proper permissions and is linked
Restore not workingUser must have purchased on the same store account
"Expo Go" not workingRevenueCat requires a development build, not Expo Go

Additional Resources