Adding Payments
This guide walks you through adding in-app purchases and subscriptions to your app using RevenueCat.Prerequisites
Before adding payments:- Apple Developer Account - Required for iOS purchases ($99/year)
- Google Play Developer Account - Required for Android ($25 one-time)
- RevenueCat Account - Free to start at revenuecat.com
RevenueCat Integration
Set up RevenueCat connection first
Step 1: Define Your Offering
Decide what you’re selling:- Subscription
- One-time Purchase
- Consumable
Recurring payments for ongoing access:
- Monthly: $9.99/month
- Yearly: $79.99/year (save 33%)
Step 2: Create Products in App Stores
App Store Connect (iOS)
- Go to your app → Subscriptions
- Create a subscription group
- Add products with prices
- Submit for review
Google Play Console (Android)
- Go to Monetization → Products → Subscriptions
- Create subscription products
- Set prices and billing periods
- Activate the products
Step 3: Add Paywall to Your App
Ask the AI to create a paywall:Step 4: Gate Premium Features
Lock features behind the subscription:Step 5: Check Subscription Status
The AI will generate code to check access:Show Status in UI
Step 6: Handle Restore Purchases
Important for returning users:Testing Purchases
iOS Sandbox Testing
- Create Sandbox Apple ID in App Store Connect
- Sign out of App Store on test device
- Sign in with Sandbox account when making test purchase
- Sandbox subscriptions renew quickly for testing
Android Test Purchases
- Add email as license tester in Play Console
- Sign in with that account on test device
- You’ll see “(test)” badge on purchase dialogs
- No real charges are made
Subscription States
Handle different subscription states:Best Practices
Clear Value First
Show what premium offers before asking to pay
Offer Free Trial
Let users try before buying
Easy Restore
Make restore purchases easily accessible
Transparent Pricing
Show prices clearly, no hidden fees
App Store Requirements
Both stores have strict requirements:Apple App Store
- Digital goods MUST use Apple IAP
- Clearly state renewal terms
- Link to terms of service
- No external payment links
Google Play Store
- Digital goods MUST use Google Play Billing
- Subscription terms visible before purchase
- Easy access to cancellation
- Clear pricing display
Analytics and Revenue
Track your revenue in RevenueCat dashboard:- Monthly Recurring Revenue (MRR)
- Active subscribers
- Trial conversions
- Churn rate
- Revenue by product
Troubleshooting
Purchase not completing
Purchase not completing
- Verify products are approved in stores
- Check RevenueCat configuration
- Ensure correct product IDs
- Test with sandbox account
Entitlement not granted
Entitlement not granted
- Check RevenueCat dashboard for purchase
- Verify entitlement linked to product
- Check webhook configuration
Restore not finding purchases
Restore not finding purchases
- Same store account required
- Check if subscription expired
- Verify sandbox vs production