RevenueCat

RevenueCat Documentation

Here you will find guides for getting RevenueCat setup and references for our SDKs and APIs.

Guides    Discussions

Migrating Existing Subscriptions

How to migrate an subscriptions from your existing setup.

Client Side Migration

The Purchases SDK automatically detects new transactions and sends them to RevenueCat. However, when migrating from an older system, you need to tell Purchases to sync to ensure we are tracking your subscribers correctly.

The way to do this is: if your existing subscription code knows you have a subscription, but RevenueCat does not, then restore transactions.

See the following pseudo example.

const isSubscribedInOldSystem = oldTracking.isSubscribed();
const isSubscribedInRevenueCat = purchaserInfo.hasActiveEntitlement("pro");

// If the old system says we have a subscription, but RevenueCat does not
if (isSubscribedInOldSystem && !isSubscribedInRevenueCat) 
{
  // Tell Purchases to restoreTransactions. 
  // This will sync the user's receipt with RevenueCat.
  Purchases.restoreTransactions();
}

When a subscriber launches with the first version containing Purchases it will trigger a restore. Once the restore is complete, it won't be triggered again.

Capturing Old Data

If you wish import historical data from users who no longer use your app you can send us a bulk receipt file for import. Email us for details.