Skip to main content

RevenueCat

RevenueCat simplifies implementing in-app purchases and subscriptions by handling all purchase validation operations.

Pub.Dev package and Limitations

The underlying package for RevenueCat does not support web. Any functionality related to in-app purchases or subscriptions managed through RevenueCat will not be available on web platforms.

Integrating the RevenueCat in your app comprises the following steps:

  1. Setup RevenueCat
  2. Enable RevenueCat in FlutterFlow
  3. Retrieving in-app purchases and subscription details
  4. Add RevenueCat actions
  5. Testing
  6. Launch

1. Setup RevenueCat

To set up the RevenueCat, follow these steps carefully:

  1. Sign up for a new RevenueCat account here.

  2. Create a project, add your app, and ensure that you add service credentials to help RevenueCat communicate with the app stores on your behalf.

  3. Create subscriptions in the respective stores.

    1. While creating subscriptions in Google Play Console, if you see a message saying 'Your app doesn't have any in-app products yet' like in this picture, follow the steps below:

    error-while-creating-sub-in-play-console.avif

    1. Return to FlutterFlow and navigate to Settings & Integrations > In App Purchases & Subscriptions > RevenueCat.

    2. Switch on the Enable RevenueCat. For now, just enter any random string as your API Key (eg. testkey). We’ll update this later.

    3. Now, from the toolbar menu, click Download APK

    4. In the Play Console, create a Closed testing track and create a new release.

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

    6. Open the Subscriptions tab again. It should let you manage subscriptions now.

  4. Create Products and Entitlements in RevenueCat.

2. Enable RevenueCat in FlutterFlow

To enable RevenueCat in FlutterFlow, follow the steps below:

3. Retrieving in-app purchases and subscription details

To display the in-app purchases and subscription details, such as price, description, etc., inside the UI elements, you need to retrieve this information from RevenueCat.

Here is an example of retrieving monthly subscription details:

4. Add RevenueCat actions

To manage in-app purchases and subscriptions inside your FlutterFlow app, you have to use the RevenueCat Actions. Below are the types of RevenueCat actions:

  • Paywall
  • Purchase
  • Restore Purchases

Paywall [Action]

This action checks whether a user has purchased an item. If not, you can open the Paywall (asking to buy an item or purchase a subscription).

Follow the steps below to see if a user is subscribed and take action accordingly.

Purchase [Action]

This action allows you to purchase the item. Here’s how you add it:

Restore Purchases [Action]

Using this action, you can allow users to re-activate the subscription they have already paid for. This is helpful when a user has reinstalled the app or logged in to a new device.

info

adding-restore-purchase-action.avif

Adding action to restore purchase

5. Testing

You can test your subscriptions using sandbox environments, which simulate real store behavior without incurring costs. This document provides detailed guidelines for testing purchases on Android and iOS devices.

6. Launch

Before launching your app to production make sure you go through the Launch Checklist of RevenueCat:

In-App Purchase Launch Checklist – RevenueCatRevenueCat

FAQs

I don't see offerings or products

If you're testing in the sandbox and the products are not retrieved from Apple/Google, it's likely a configuration issue. To resolve this, ensure the following:

  1. The product identifier set in RevenueCat matches exactly with the store.
  2. You're testing on a physical device and not a simulator.
  3. The bundle ID in Xcode [iOS] or package name [Google] matches what's in App Store Connect or Google Play Developer console.

For iOS only, ensure that products are in the 'Ready To Submit' or 'Approved' state, you've signed your 'Paid Applications Agreement', and you're not using a StoreKit Configuration file.

For Google only, ensure that the subscription product is in the Active state, your app is published on a closed track, and you've added a tester.

See more details here.