
Integrate Revenuecat
- 332 installs
- 55 repo stars
- Updated August 3, 2026
- revenuecat/ai-toolkit
Add RevenueCat subscriptions to iOS, Android, or cross-platform apps: SDK install, offerings, entitlements, purchase flow, and server receipt validation.
About
Walks agents through end-to-end RevenueCat integration for mobile and SaaS apps: initialize SDKs, map products to entitlements, implement purchase and restore UX, validate receipts server-side, and sync subscription events.
- SDK install across platforms
- Offerings and entitlements setup
- Purchase and restore flows
- Server-side receipt checks
- Webhook event wiring
Integrate Revenuecat by the numbers
- 332 all-time installs (skills.sh)
- +39 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #360 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/revenuecat/ai-toolkit --skill integrate-revenuecatAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 332 |
|---|---|
| repo stars | ★ 55 |
| Last updated | August 3, 2026 |
| Repository | revenuecat/ai-toolkit ↗ |
What it does
Add RevenueCat subscriptions to iOS, Android, or cross-platform apps: SDK install, offerings, entitlements, purchase flow, and server receipt validation.
Files
integrate-revenuecat: end-to-end RevenueCat integration
Use this skill when the user wants to add RevenueCat to a project for the first time, or to reconfigure the SDK with a public API key. The skill covers two halves:
1. Dashboard side — set up the project, register the app, and obtain the public API key, all through the RevenueCat MCP server. 2. App side — install the Purchases SDK, call Purchases.configure(…) at app entry, and verify the configuration banner in the logs.
Walk them in order. Most integrations need both halves, even when the user asks "just install the SDK" — the SDK needs an API key from the dashboard.
If a project + app already exist and the user only wants to wire the SDK into code, jump to Section 3 below.
If the user wants to bootstrap a brand new RevenueCat project (apps + products + entitlements + offerings), use the create-revenuecat-project skill instead, then come back here for the SDK install.Arguments
Available as $ARGUMENTS when invoked as a slash command:
platform(optional): One ofios,android,kmp,flutter,react-native. If omitted, run the detection algorithm in Section 3a.app_identifier(optional): Bundle ID (iOS) or package name (Android). If omitted, read it from the project files (Info.plist,AndroidManifest.xml,app.json,pubspec.yaml).project_name(optional): Name of the RevenueCat project to use. If omitted, list projects via MCP and ask the user.
1. Understand the status quo
Before touching the dashboard, gather the facts:
- Platform target: iOS / Apple App Store, Android / Google Play, or both. Inspect the working directory before asking — the detection algorithm in Section 3 makes this obvious for most projects.
- Technology: native iOS (Swift), native Android (Kotlin / Java), React Native, Flutter, Kotlin Multiplatform. SDK list: https://www.revenuecat.com/docs/getting-started/installation.md.
- App identifier: bundle ID (iOS), package name (Android). Pull from
Info.plist/AndroidManifest.xml/app.json/pubspec.yamlrather than asking.
2. Dashboard side — RevenueCat MCP
Use the RevenueCat MCP server for every tool call below.
2a. Get or create the project
list-projects— list accessible projects. If multiple, ask the user which one matches this app, or offer to create a new one.- If there is no project, hand off to the
create-revenuecat-projectskill, then resume here. - Store the
project_idfor the rest of the steps.
2b. Get or create the app
- Check which apps are already configured in the project. A
test_storeapp is always present;app_storeandplay_storeapps are present only if the user has finished store-side setup. - Ask the user whether their app is already set up in App Store Connect (iOS) or Google Play Console (Android). Reassure them that store-side setup can come later — the
test_storeapp is enough to start integrating. - If the user confirms store-side setup is done, call
create-app: - iOS:
type: "app_store",bundle_idfrom Section 1. - Android:
type: "play_store",package_namefrom Section 1. namederived from the identifier or asked from the user.
2c. Get the public API key
- Call
list-public-api-keyswith the relevant app ID: app_store/play_storeif the store-side app exists.- Otherwise the
test_storeapp. - The returned key is public and safe to embed in client app code. iOS keys are prefixed
appl_…, Android keysgoog_…, Amazonamzn_….
Never use the secret API key in client code. Secret keys are server-side only.
3. App side — install and configure the SDK
3a. Detect the platform
Inspect the working directory and pick the first match, from top to bottom:
1. React Native: package.json has a react-native-purchases entry, or react-native as a dependency → read platforms/react-native.md. If expo is also a dependency, note it as an Expo project. 2. Flutter: pubspec.yaml exists at the project root → read platforms/flutter.md. 3. Kotlin Multiplatform: build.gradle.kts contains a kotlin { … } multiplatform source sets block, or depends on com.revenuecat.purchases:purchases-kmp* → read platforms/kmp.md. 4. Android (native): build.gradle(.kts) applies com.android.application (and is not KMP) → read platforms/android.md. 5. iOS (native): Package.swift, *.xcodeproj, *.xcworkspace, or Podfile at the project root → read platforms/ios.md.
If several match (e.g. an ios/ folder inside a Flutter project), pick the outermost project, the one that owns the build. If still ambiguous, ask the user which platform they want to configure.
3b. Shared concepts (all platforms)
- Public SDK key, not secret key. RevenueCat issues a separate public SDK key per store/platform. iOS apps use an
appl_…key, Android apps use agoog_…key (Amazon usesamzn_…). Server-side secret keys must never appear in client apps. - Configure once per app launch. Call
Purchases.configure(…)exactly once, as early as possible (app entry point). Later calls no-op or warn. - Anonymous users by default. If you don't pass an
appUserID, RevenueCat creates a stable anonymous ID. Only passappUserIDif you already have an authenticated user at launch; otherwise calllogIn(…)later (see therevenuecat-identify-userskill). - Enable debug logging during integration. Each platform file shows how. Turn it off for release builds.
- Keep keys out of source control. Recommend
.env(RN),xcconfig(iOS),local.properties/gradle.properties(Android), or dart-define (Flutter) when the user asks about secret management.
3c. Implementation
Read the platform file that matches detection:
platforms/ios.mdplatforms/android.mdplatforms/kmp.mdplatforms/flutter.mdplatforms/react-native.md
Each platform file is self-contained: install command, exact configure snippet, and where to place it in the app entry point.
4. Verify
Do not claim setup is complete until:
1. The project builds (Xcode build, ./gradlew assembleDebug, flutter run, npx react-native run-ios, or the KMP equivalent). 2. The app launches and the RevenueCat SDK logs a configuration banner in the console / logcat / Metro output (each platform file describes the expected log line). 3. No authentication errors appear on the first SDK network call. A wrong API key surfaces as an auth error log as soon as the app fetches offerings.
If the user only asked to "install" without running the app, tell them what to look for in the logs when they do run it.
5. Next steps
5a. Products, entitlements, offerings
Check whether products, entitlements, and offerings are already set up in the project. If not, offer to help via the create-revenuecat-project skill.
5b. Store-side setup
iOS (App Store Connect)
1. In-App Purchase Key (recommended for StoreKit 2) — App Store Connect → Users and Access → Integrations → In-App Purchase. Generate key, download the .p8 file. Note the Key ID and Issuer ID. 2. Shared Secret (legacy StoreKit 1) — App Store Connect → App → App Information → App-Specific Shared Secret. 3. If the user provides this information, register it on the RevenueCat side via create-app / update-app.
Android (Google Play Console)
1. Service account credentials — Create a service account in Google Cloud Console. Grant "Service Account User" role. Create a JSON key. In Play Console, grant the service account access with "View financial data" permission. 2. Real-time Developer Notifications (RTDN) — Set up a Cloud Pub/Sub topic. Configure in Play Console → Monetization setup. 3. If the user provides this information, register it via create-app / update-app.
5c. Subsequent skills
Common follow-ups after integrate-revenuecat:
revenuecat-paywall— display a dashboard-configured paywall.revenuecat-purchase-flow— implement purchase + restore manually.revenuecat-entitlements-gate— gate features behind active entitlements.revenuecat-identify-user— wirelogIn/logOutto the app's auth system.revenuecat-testing-setup— set up a sandbox testing channel.revenuecat-troubleshoot— diagnose offerings / products / entitlement bugs.
integrate-revenuecat: Android (native Kotlin/Java)
Install
Find the latest stable release at <https://github.com/RevenueCat/purchases-android/releases> and substitute that tag for <latest> in the snippet below. If GitHub is unreachable, ask the user for a version to pin or check their existing project files for one.
Gradle (Kotlin DSL)
In the app module's build.gradle.kts:
dependencies {
implementation("com.revenuecat.purchases:purchases:<latest>")
// implementation("com.revenuecat.purchases:purchases-ui:<latest>") // optional, native paywalls
}Gradle (Groovy DSL)
dependencies {
implementation 'com.revenuecat.purchases:purchases:<latest>'
// implementation 'com.revenuecat.purchases:purchases-ui:<latest>'
}mavenCentral() must be in settings.gradle(.kts) → dependencyResolutionManagement.repositories (it's there by default for projects created with recent Android Studio templates).
Configure
Create a custom Application class so configure runs before any Activity.
MyApplication.kt
package com.example.myapp
import android.app.Application
import com.revenuecat.purchases.LogLevel
import com.revenuecat.purchases.Purchases
import com.revenuecat.purchases.PurchasesConfiguration
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Purchases.logLevel = LogLevel.DEBUG // remove for release
Purchases.configure(
PurchasesConfiguration.Builder(this, "goog_YOUR_PUBLIC_SDK_KEY")
.build()
)
}
}Register it in AndroidManifest.xml
<application
android:name=".MyApplication"
... >
...
</application>Notes
- Use the Google Play public SDK key: it starts with
goog_(Amazon Appstore keys start withamzn_). - The SDK declares
com.android.vending.BILLINGin its own manifest; you do not need to add it. - Minimum SDK: 21. Confirm
minSdkin the app module'sbuild.gradle(.kts). - Proguard/R8: the SDK ships consumer rules, no extra config needed.
Verify
Run the app. In logcat, filter by tag Purchases and look for:
Purchases: ℹ️ [Purchases] - INFO: 😻👼 Purchases is configuredA wrong API key shows up as an auth error on the first offerings fetch. No logs at all usually means android:name=".MyApplication" is missing from the manifest.
integrate-revenuecat: Flutter
Install
Find the latest stable release at <https://github.com/RevenueCat/purchases-flutter/releases> and substitute that tag for <latest> in the snippet below. If GitHub is unreachable, ask the user for a version to pin or check their existing pubspec.yaml for one.
In pubspec.yaml:
dependencies:
purchases_flutter: ^<latest>
# purchases_ui_flutter: ^<latest> # optional, for native paywallsThen:
flutter pub getiOS target
cd ios && pod install && cd ..Minimum iOS deployment target is 13.0. Update ios/Podfile:
platform :ios, '13.0'Android target
Minimum SDK is 21. In android/app/build.gradle:
defaultConfig {
minSdk 21
}Configure
In lib/main.dart, configure before runApp so the rest of the app can rely on the SDK being up:
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:purchases_flutter/purchases_flutter.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Purchases.setLogLevel(LogLevel.debug); // remove for release
final apiKey = Platform.isIOS
? 'appl_YOUR_IOS_PUBLIC_SDK_KEY'
: 'goog_YOUR_ANDROID_PUBLIC_SDK_KEY';
await Purchases.configure(PurchasesConfiguration(apiKey));
runApp(const MyApp());
}Notes
- Two public SDK keys, one per platform. Branch on
Platform.isIOS/Platform.isAndroid. Purchases.configureis async;awaitit beforerunAppor any code that reads offerings.purchases_fluttersupports iOS and Android only. Web, macOS, Windows, and Linux targets are not supported.- For a multi flavor app, load the API key from
--dart-defineor an environment wrapper rather than hard coding it.
Verify
flutter run. Expect the native SDK log banner in the Dart/native console:
- iOS simulator/device → Xcode console also shows
[Purchases] - INFO: 😻👼 Purchases is configured - Android emulator/device →
flutter logs(oradb logcat) showsPurchases: ℹ️ [Purchases] - INFO: 😻👼 Purchases is configured
integrate-revenuecat: iOS (native)
Install
Find the latest stable release at <https://github.com/RevenueCat/purchases-ios/releases> and substitute that tag for <latest> in the snippet below. If GitHub is unreachable, ask the user for a version to pin or check their existing project files for one.
Pick the dependency manager already in use.
Swift Package Manager (preferred)
In Xcode: File → Add Package Dependencies…, enter:
https://github.com/RevenueCat/purchases-iosPick the version you resolved above and add the RevenueCat product to your app target. Also add RevenueCatUI if the user will want native paywalls later.
For a Package.swift-based project:
dependencies: [
.package(url: "https://github.com/RevenueCat/purchases-ios", from: "<latest>")
],
targets: [
.target(
name: "MyApp",
dependencies: [
.product(name: "RevenueCat", package: "purchases-ios"),
// .product(name: "RevenueCatUI", package: "purchases-ios"),
]
)
]CocoaPods
# Podfile
pod 'RevenueCat'
# pod 'RevenueCatUI' # optional, for native paywallsThen pod install.
Configure
Call Purchases.configure(withAPIKey:) once at app launch.
SwiftUI App
import SwiftUI
import RevenueCat
@main
struct MyApp: App {
init() {
Purchases.logLevel = .debug // remove for release
Purchases.configure(withAPIKey: "appl_YOUR_PUBLIC_SDK_KEY")
}
var body: some Scene {
WindowGroup { ContentView() }
}
}UIKit AppDelegate
import UIKit
import RevenueCat
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: "appl_YOUR_PUBLIC_SDK_KEY")
return true
}
}Notes
- Use the iOS public SDK key: it starts with
appl_. Find it in the RevenueCat dashboard under Project → API keys. - Deployment target: async/await SDK APIs require iOS 13+. For older targets, completion handler variants exist (
getOfferings(completion:),purchase(product:completion:)). - For sandbox testing with a StoreKit Configuration File, attach it to the scheme (Run → Options → StoreKit Configuration). See
revenuecat-testing-setupwhen available.
Verify
Build and run. In the Xcode console look for:
[Purchases] - INFO: 😻👼 Purchases is configuredA wrong API key shows up as an auth error log on the first getOfferings call. If you see no Purchases logs at all, Purchases.logLevel = .debug is missing or the configure call isn't running at launch.
integrate-revenuecat: Kotlin Multiplatform
purchases-kmp is a thin Kotlin Multiplatform wrapper over the native iOS and Android SDKs. Behavior matches the native SDKs; only the entry point differs.
Install
Find the latest stable release at <https://github.com/RevenueCat/purchases-kmp/releases> and substitute that tag for <latest> in the snippet below. The KMP tag uses a <wrapper>+<bundled-deps> format (e.g. 2.10.2+17.55.1), where the part before + is the KMP wrapper version and the part after is the bundled purchases-hybrid-common version. Use the full tag string as the artifact version first; if Gradle interprets the + as a wildcard, fall back to the wrapper portion only (e.g. 2.10.2). If GitHub is unreachable, ask the user for a version to pin.
In the shared module's build.gradle.kts:
kotlin {
// … your targets (androidTarget(), iosX64(), iosArm64(), iosSimulatorArm64(), etc.)
sourceSets {
commonMain.dependencies {
implementation("com.revenuecat.purchases:purchases-kmp-core:<latest>")
// implementation("com.revenuecat.purchases:purchases-kmp-ui:<latest>") // Compose Multiplatform paywalls
}
}
}Add mavenCentral() to your project repositories if it isn't already there.
iOS linking
purchases-kmp bridges to purchases-ios on iOS. If you use CocoaPods with the Kotlin CocoaPods plugin, the bridge pod is wired automatically. For pure Swift Package Manager setups, follow the iOS target instructions in the purchases-kmp README. The exact shape evolves per release.
Configure
Call Purchases.configure(…) once per platform, as early as possible in each platform's entry point. The API key differs per store, so pass the right one on each platform.
Shared entry point (commonMain)
import com.revenuecat.purchases.kmp.LogLevel
import com.revenuecat.purchases.kmp.Purchases
import com.revenuecat.purchases.kmp.PurchasesConfiguration
fun initRevenueCat(apiKey: String) {
Purchases.logLevel = LogLevel.DEBUG // remove for release
Purchases.configure(
PurchasesConfiguration.Builder(apiKey = apiKey).build()
)
}Android: call from Application.onCreate()
On Android, PurchasesConfiguration needs a Context. The KMP SDK provides a platform specific overload that takes the Android Context as the first argument. Use it from your Application class:
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
// The purchases-kmp Android actual of PurchasesConfiguration takes a Context.
// Pass it here before forwarding to the shared initRevenueCat, or construct
// the PurchasesConfiguration inline on this Android-only path.
initRevenueCat("goog_YOUR_ANDROID_PUBLIC_SDK_KEY")
}
}If thePurchases.configure(...)signature in your installed version of purchases-kmp requires a different shape on Android (e.g.PurchasesConfiguration(context, apiKey)), follow what the IDE autocompletes. The KMP SDK'sexpect/actualsurface has changed across versions. Don't guess.
iOS: call from @main App (SwiftUI)
import shared // the KMP framework produced from your shared module
@main
struct iOSApp: App {
init() {
MainKt.initRevenueCat(apiKey: "appl_YOUR_IOS_PUBLIC_SDK_KEY")
}
var body: some Scene { WindowGroup { ContentView() } }
}Notes
- Two public SDK keys:
appl_…for iOS,goog_…for Android. Keep them separate. - Because the KMP SDK wraps the native SDKs, the verify logs below are the native SDK logs. See
platforms/ios.md/platforms/android.mdfor the exact log line on each side. - When in doubt about the exact shape of
PurchasesConfiguration, check the installed version's source or the purchases-kmp README. The skill prefers "accurate for your version" over "plausibly correct in general."
Verify
Run each platform target. Expect:
- iOS:
[Purchases] - INFO: 😻👼 Purchases is configuredin Xcode console. - Android:
Purchases: ℹ️ [Purchases] - INFO: 😻👼 Purchases is configuredin logcat.
integrate-revenuecat: React Native
Install
The npm install commands below resolve the current latest at install time, so no version pin is needed in this skill. To verify the installed version after install, check package.json. The full release history lives at <https://github.com/RevenueCat/react-native-purchases/releases>.
Bare React Native
npm install react-native-purchases
# npm install react-native-purchases-ui # optional, for native paywalls
cd ios && pod install && cd ..Expo
npx expo install react-native-purchases
# npx expo install react-native-purchases-uireact-native-purchases requires a development build. It will not work in Expo Go because it links native code. Produce a dev client with npx expo prebuild (bare workflow) or eas build --profile development.
Configure
Call Purchases.configure once when the app mounts. In App.tsx (or index.js):
import { useEffect } from 'react';
import { Platform } from 'react-native';
import Purchases, { LOG_LEVEL } from 'react-native-purchases';
export default function App() {
useEffect(() => {
Purchases.setLogLevel(LOG_LEVEL.DEBUG); // remove for release
const apiKey = Platform.OS === 'ios'
? 'appl_YOUR_IOS_PUBLIC_SDK_KEY'
: 'goog_YOUR_ANDROID_PUBLIC_SDK_KEY';
Purchases.configure({ apiKey });
}, []);
return /* … your UI … */;
}Notes
- Two public SDK keys, one per platform. Branch on
Platform.OS. - Deployment targets: iOS 13+, Android minSdk 21.
Purchases.configureis synchronous; it kicks off async initialization internally. You can callgetOfferings()right after without awaiting configure.- If running under Expo, confirm the user is on a dev client (not Expo Go) before testing. Purchase APIs will throw otherwise.
Verify
Run the app. Expect the native SDK logs:
- iOS → Xcode console:
[Purchases] - INFO: 😻👼 Purchases is configured - Android → Android Studio logcat (or
adb logcat) with tagPurchases:ℹ️ [Purchases] - INFO: 😻👼 Purchases is configured
Metro bundler (JS) console will not show the native SDK logs; you need the platform logs.