Skip to content

Setup RevenueCat

Prerequisites

  1. Have an app in Google Play Console and/or App Store Connect.
  2. A RevenueCat Account (create one here).
  3. A RevenueCat Project configured for Android/iOS (guide).

Flutter Setup

Once you have the prerequisties, the integration in the app is as simple as adding the Google and/or Apple keys in the app/.env file and build the environment using the build_runner.

KEY_REVENUECAT_GOOGLE=goog_xxxx
KEY_REVENUECAT_APPLE=appl_yyyy

Configure products

Setting up products is the most important step to configure your app but also the most time-consuming. Follow RevenueCat official docs to configure your products.

Configure Webhooks

The payment system uses Firebase Functions to handle webhooks from RevenueCat:

  1. Go to https://app.revenuecat.com/settings/webhooks

  2. Click the ’+’ button

  3. Use your deployed Firebase Function as Webhook URL

    https://LOCATION-PROJECTID.cloudfunctions.net/api/v1/payment/event/rc
  4. You can define an “Authorization header value” and check it matches in the function

  5. Save webhook.