RevenueCat

Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

Get Started    API Reference

Observer Mode

Using RevenueCat without changing existing purchase code

In some cases, if you have already built a functioning subscription system, it may not be possible or feasible to use the Purchases SDK to make purchases. However, you can still use the SDK to get access to the advanced charting, webhooks, and attribution that RevenueCat can provide.

By simply setting up and instantiating an instance of Purchases in "Observer Mode", receipts can be recorded and stored in the RevenueCat backend without interfering with any of your existing code. On iOS, receipts can be recorded automatically, on Android, use syncPurchases after purchases and restores to record receipts in RevenueCat.

Requirements

Google Play Billing Library: 2.0+ (Android only)

📘

Older versions of Google Play Billing Library are supported in version 2.4.1 or the Android SDK

1. Configure Purchases SDK in Observer Mode

Purchases.configure(
            withAPIKey: "my_api_key",
            appUserID: "my_app_user_id",
            observerMode: true)
[RCPurchases 
    configureWithAPIKey:@"my_api_key" 
    appUserID:@"my_app_user_id"
    observerMode: YES];
Purchases.configure(this, "my_api_key", "my_app_user_id", true)
Purchases.configure(this, "my_api_key", "my_app_user_id", true);
await Purchases.setup("my_api_key", observerMode: true);

❗️

Important (Android only)

On Android, RevenueCat won't consume or acknowledge any purchase in Observer Mode so be sure your app is handling that. Failure to do so will result in your purchases being refunded after 3 days.

Enable Observer Mode in Unity configuration (Unity Only)

❗️

Important note regarding InAppBillingService (Android Unity only)

If using RevenueCat alongside Unity IAP or other plugin that includes the Android InAppBillingService class, follow this instructions

2. Sync purchases with RevenueCat (Android only)

On Android (or cross-platform SDKs), any time a purchase or restore occurs in your app you should call the syncPurchases method to record it in RevenueCat.

// Called any time a purchase or restore 
// is successful in your existing code
Purchases.sharedInstance.syncPurchases()
// Called any time a purchase or restore 
// is successful in your existing code
Purchases.getSharedInstance().syncPurchases();
// Called any time a purchase or restore 
// is successful in your existing code
Purchases.syncPurchases();

🚧

Important

Failing to call syncPurchases after purchases and restores in Observer Mode will prevent any transactions from being recorded.

👍

You've done it!

That's all there is to it to enable RevenueCat in your app! There are certain features, like entitlements, that can only be enabled with a deeper SDK integration. When the that time comes, head back to our Quickstart guide to get set up.

Updated 6 days ago


Observer Mode


Using RevenueCat without changing existing purchase code

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.