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
- Go to app.revenuecat.com
- Click Sign Up and create your account (or sign in with GitHub/Google)
- Verify your email address if required
Create a New Project
- Click the + Create new project button in the Projects dropdown
- Enter your project name (e.g., "My App")
- 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)
- In your RevenueCat project, go to Project Settings (gear icon) → Apps
- Click + New and select App Store
- Enter your Bundle ID, this must match the
bundleIdentifierin yourapp.json - Get your App Store Connect Shared Secret:
- Go to App Store Connect → Your App
- Click App Information (under General)
- Scroll to App-Specific Shared Secret → Manage
- Generate and copy the secret
- Paste the shared secret in RevenueCat
- Click Save
Add Android App (Google Play)
- Click + New and select Play Store
- Enter your Package Name, this must match the
packagein yourapp.json - Set up Google Play Service Account:
- Go to Google Cloud Console
- Create or select a project
- Go to IAM & Admin → Service Accounts
- Click Create Service Account
- Name it (e.g., "RevenueCat Service Account")
- Grant Pub/Sub Admin role
- Click Done
- Click on the service account → Keys → Add Key → Create new key → JSON
- Download the JSON file
- In Google Play Console, add this service account:
- Go to Setup → API access
- Click Link next to your Cloud project
- Grant the service account Admin permissions
- Upload the JSON file to RevenueCat
- 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
- Go to App Store Connect → My Apps → Select your app
- In the sidebar under Monetization, click Subscriptions
- Click + (Create Subscription Group)
- Enter a Reference Name (internal only, e.g., "Premium Subscriptions")
- Click Create
Add Subscription Products
- Click + next to your subscription group to add a product
- 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.)
- Click Create
Configure Pricing
- In your product, scroll to Subscription Prices
- Click + to add a price
- Select your base country/region
- Choose the price tier (e.g., $9.99 for monthly)
- Click Next to accept auto-generated regional prices (or customize)
- Click Confirm
Add Free Trial (Optional)
- In your product, scroll to Introductory Offers
- Click + to add an offer
- Configure:
- Countries/Regions: Select all or specific
- Offer Type: Free
- Duration: e.g., 7 days
- Click Confirm
Add App Store Localization
- Scroll to App Store Information
- Click + next to localization
- Select your language
- Enter:
- Subscription Display Name: User-visible name (e.g., "Premium Monthly")
- Description: What users get with this subscription
- Click Save
Step 4: Create Products in Google Play Console (Android)
Create a Subscription
- Go to Google Play Console → Select your app
- Navigate to Monetize → Products → Subscriptions
- Click Create subscription
- Enter:
- Product ID: Use the same ID as iOS (e.g.,
yourapp_premium_monthly) - Name: Internal reference name
- Product ID: Use the same ID as iOS (e.g.,
- Click Create
Add a Base Plan
- In your subscription, click Add base plan
- Enter:
- Base plan ID: e.g.,
monthly-autorenew - Renewal type: Auto-renewing
- Billing period: 1 Month (match your iOS product)
- Base plan ID: e.g.,
- Add pricing:
- Click Set prices
- Set your default price and regional prices
- Click Save
- Click Activate to make the plan available
Add Free Trial Offer (Optional)
- In your base plan, click Add offer
- Select Free trial
- Configure:
- Offer ID: e.g.,
free-trial-7days - Eligibility: New customers
- Duration: 7 days (or match iOS)
- Offer ID: e.g.,
- Click Save and Activate
Step 5: Configure RevenueCat Products & Entitlements
Create an Entitlement
Entitlements define what access users receive after purchase.
- In RevenueCat, go to Product Catalog → Entitlements
- Click + New
- Enter an identifier:
premium(orpro,plus, etc.) - Add an optional description
- 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
- Go to Product Catalog → Products
- Click + New
- Select the App (iOS or Android)
- Enter the Product Identifier exactly as it appears in App Store Connect or Google Play
- Click Create
Repeat for each product (Monthly, Yearly, etc.) for both platforms.
Attach Products to Entitlements
- Go to Product Catalog → Entitlements
- Click on your entitlement (e.g.,
premium) - Click Attach
- Select all products that should unlock this entitlement
- 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.
- Go to Product Catalog → Offerings
- Click + New
- Enter an identifier:
default - Click Create
Add Packages:
- Click on your offering
- Click + New Package
- Select package type and attach products:
| Package Type | Product |
|---|---|
| Monthly | yourapp_premium_monthly |
| Annual | yourapp_premium_yearly |
| Lifetime | yourapp_premium_lifetime (optional) |
- Set as Current: Toggle ON for your default offering
Step 6: Get Your API Keys
Find Your Public API Keys
- In RevenueCat, go to Project Settings (gear icon)
- Click API Keys
- Copy the Public API Key for each platform:
- iOS: Starts with
appl_ - Android: Starts with
goog_
- iOS: Starts with
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_xxxxxxxxxxxxStep 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
- Go to App Store Connect → Users and Access
- Click Sandbox in the sidebar
- Click + to add a Sandbox Tester
- Enter a unique email (can be fake, but must be unique)
- Create a password and fill required fields
- Click Create
Test on Device
- On your iOS device, go to Settings → App Store
- Scroll down and tap Sandbox Account
- Sign in with your sandbox tester credentials
- Make purchases in your app, you won't be charged
Sandbox subscription renewal times:
| Duration | Sandbox Renewal |
|---|---|
| 1 Week | 3 minutes |
| 1 Month | 5 minutes |
| 2 Months | 10 minutes |
| 3 Months | 15 minutes |
| 6 Months | 30 minutes |
| 1 Year | 1 hour |
Android Test Purchases
Add License Testers
- Go to Google Play Console
- Navigate to Setup → License testing
- Add Gmail addresses of your testers
- 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:
- Create products in RevenueCat's Test Store instead of real stores
- Test Store purchases work in iOS SDK 5.43.0+ and Android SDK 9.9.0+
- Products behave like real purchases but don't require store configuration
Common Issues
| Issue | Solution |
|---|---|
| "Product not found" | Verify product ID matches exactly between stores and RevenueCat |
| Entitlement not unlocking | Check product is attached to the correct entitlement in RevenueCat |
| Sandbox purchases failing | Ensure sandbox email doesn't exist as a real Apple ID |
| Play Store purchases stuck | Verify service account has proper permissions and is linked |
| Restore not working | User must have purchased on the same store account |
| "Expo Go" not working | RevenueCat requires a development build, not Expo Go |