🐈Setup RevenueCat App

Natively uses RevenueCat service to integrate In-App Purchases for iOS & Android apps.

RevenueCat makes implementing in-app purchases and subscriptions easy by handling all purchase validation operations. With RevenueCat, you can allow users to purchase subscriptions, make sure your user pays for some features, and more. You can use RevenueCat to setup Stripe,

Video Guides

Prerequisites

If you are new to RevenueCat, it's recommended you read this first: What is RevenueCat?

RevenueCat Integration

Integrating the RevenueCat in your app comprises of the following steps:

1. Revenue Cat's initial setup

Follow the first 3 steps of the following guide by RevenueCat to create and configure your RevenueCat app:

2. Connect Revenue Cat with your Natively App

After successfully creating Android/iOS app in the RevenueCat you need to link it with the Natively. For such purpose, follow the next steps:

  1. Open your Natively's app dashboard from desktop

  2. Go to Features -> Purchases and enable it.

  3. Enter your Public app-specific API Keys to relevant fields. You can find it in your RevenueCat project API Keys -> Public app-specific API keys

And finally, order a new build. We will inject the following keys into your app bundle.

3. Google Play / App Store products setup

Before incorporating subscriptions into your app, you will first need to create the subscription products in the Google Play Store and App Stores.

Google Play Store

To create a subscription product in the Google Play Store:

  1. Open your app on the Google Play Console.

  2. Open the Subscriptions tab (from the left side menu). Check if you see Create subscription button. If you do, you can skip this step.

  3. If you see a message saying 'Your app doesn't have any in-app products yet' like in this picture:

You will need to complete the following steps:

  1. Download the AAB or APK file of your app, that was delivered on your email (or from the Natively portal)

  2. Go to the Play Store. Open your Closed testing track and create a new release.

  3. Upload your App Bundle or APK, enter the Release name and create the release.

  4. Go back to Google Play Console and open the Subscriptions tab again. It should let you manage subscriptions now.

  5. Now, follow this guide by RevenueCat to configure your products or subscriptions on Google Play.

App Store

To create a subscription product in App Store:

  1. Open App Store Connect Portal and navigate to your app.

  2. Follow this guide by RevenueCat to configure your products or subscriptions for App Store

  3. Make sure that the state of your purchases is Ready to Submit.

  4. Navigate to the Agreements page and sign the Paid Apps agreement. The state must be Active before making purchases, even in the sandbox mode.

  5. Navigate the Testers page and add sandbox testers. Make sure to confirm the emails of all sandbox testers.

4. Revenue Cat products setup

RevenueCat uses an Entitlements system to control access to premium features, and Offerings to manage the set of products you offer to customers.

Learn more about configuring products in RevenueCat here.

You must create at least one entitlement and at least one offering for using RevenueCat with Natively.

After the creation, the Products, Entitlements, and Offers will look like this:

To use a Stripe with Android & iOS subscription/products, check this page for more details.

Connect to Google Play Store

To allow RevenueCat servers to communicate with Google on your behalf, please follow the instructions present on this page:

It may take a few hours for these credentials to propagate. Until then, your purchases can fail with "There was a credentials issue. Check the underlying error for more details".

Connect to Apple App Store

To connect the RevenueCat servers to App Store, follow the instructions present on this page:

And this one:

5. Development

💸pageIn-App Purchases

6. Testing

Creating Test Users

Test on Android: To create test users to try Play Store purchases in the sandbox mode, follow this guide by RevenueCat. You need to create a test user, configure licensing testing, create a closed track, and add a tester.

Test on iOS: To create test users to try App Store purchases in the sandbox mode, follow this guide by RevenueCat.

Last updated