How to Add In-App Purchases to a Mobile App with RevenueCat
Published: Sep 8, 2025 · 11 min read
In-app purchases are the primary revenue model for mobile apps. But integrating StoreKit on iOS and Google Play Billing on Android is notoriously complex. Receipt validation, subscription management, trial periods, and refund handling are edge-case heavy. RevenueCat solves all of this with a single SDK that works across every mobile platform.
StoreKit 2 vs RevenueCat: Why Not Roll Your Own?
StoreKit 2 (iOS) and Google Play Billing Library v7 (Android) are the native APIs for in-app purchases. They work well for single-platform apps with simple needs. But once you need cross-platform subscription management, server-side receipt validation, or analytics on conversion rates, the native APIs become insufficient.
RevenueCat sits on top of both native APIs and provides a unified abstraction. You configure products, entitlements, and offerings in the RevenueCat dashboard. The SDK handles purchase flows, receipt validation (server-side, not client-side), subscription status tracking, and webhook notifications to your backend.
The key advantage: RevenueCat validates receipts on their servers using Apple and Google's APIs. This means you do not need to build and maintain your own receipt validation endpoint. For a solo developer or small team, this saves weeks of work and eliminates a common security vulnerability.
Why RevenueCat Handles Subscriptions Better
Subscriptions are messy. Users upgrade, downgrade, cancel, pause, and request refunds. Apple and Google each have their own rules for grace periods, billing retries, and subscription state transitions. Tracking all of this manually across both platforms is a full-time job.
RevenueCat normalizes all of this into a single data model. A user's subscription state is either active, expired, cancelled, or trial. You query this from the SDK or from the REST API. No parsing raw receipt data, no dealing with Apple's JWS format, no handling Google's purchase token lifecycle.
RevenueCat also handles cross-platform entitlements. If a user purchases a subscription on iOS and then switches to Android, you can restore their entitlements using their RevenueCat app user ID. This is critical for any app that targets both platforms.
Setup Flow: From Zero to Purchases
1. Create a RevenueCat account and connect your App Store Connect and Google Play Console credentials. RevenueCat uses these to sync your products and validate receipts.
2. Configure products and entitlements in the RevenueCat dashboard. Create products (e.g., "pro_monthly", "pro_yearly"), link them to your App Store and Play Store products, and define an entitlement ("pro") that grants access to premium features.
3. Add the SDK to your app. In React Native, install react-native-purchases. In Flutter, use purchases_flutter. In SwiftUI, add the RevenueCat Swift package. In Kotlin and Java, add the Gradle dependency.
4. Configure the SDK with your API key and call Purchases.configure() at app startup. This initializes the connection to RevenueCat's servers.
5. Build your paywall UI using the offerings returned by the SDK. Offerings contain the packages (monthly, yearly, lifetime) with localized pricing. Display these in a paywall component and call purchasePackage() when the user taps buy.
Testing Purchases
RevenueCat provides a sandbox environment for testing. On iOS, use StoreKit Configuration Files in Xcode. On Android, use test tracks in the Play Console. RevenueCat's dashboard shows all test transactions in real time.
You can also use RevenueCat's REST API to simulate purchases for automated testing. This is useful for CI/CD pipelines where you want to verify that your paywall logic works without manual testing.
How Beyondkitter Pre-Wires RevenueCat
Every Beyondkitter stack includes RevenueCat integration with a pre-built paywall component and entitlement checking:
- React Native Expo —
react-native-purchases, PaywallGate component, useSubscription hook - Flutter —
purchases_flutter, PaywallScreen widget, Riverpod entitlement state - SwiftUI — RevenueCat Swift package, PaywallView, async/await entitlement check
- Kotlin Jetpack Compose — RevenueCat Android SDK, Compose Paywall, coroutine-based entitlement
- Java Android — RevenueCat Android SDK, XML Paywall layout, RxJava entitlement flow
The useSubscription() hook (or equivalent in other stacks) is the single source of truth for whether a user is a Pro subscriber. This means you never hardcode paywall checks in local state. RevenueCat's server-verified entitlement is authoritative.
Pricing and Revenue Sharing
RevenueCat is free for apps making under $2,500/month in revenue. After that, their pricing is a percentage of tracked revenue. For most indie developers and small teams, the free tier is sufficient to launch and validate your product.
Apple takes 30% (15% for small businesses) and Google takes 15-30% depending on revenue. RevenueCat's cut is on top of that, but the value they provide in receipt validation, subscription management, and analytics far outweighs the cost.
Ready to start building?
Beyondkitter has Clerk Auth, Supabase, and RevenueCat pre-wired in 5 stacks.
Get Beyondkitter, $54