Skip to main content
The RevenueCat plugin simplifies the integration of in-app purchases and subscriptions by leveraging RevenueCat’s backend and SDKs for iOS and Android. This plugin provides a streamlined approach to fetching products, processing purchases, and restoring past transactions, reducing the complexity of implementing Apple’s StoreKit and Google Play Billing.

Implementation guide

RevenueCat setup

Step 1: Connect your mobile apps

Start by adding your iOS and Android apps in RevenueCat under Apps & Providers.
Apps and Providers page in the RevenueCat dashboard

RevenueCat: Apps & Providers

Step 1.1: Create a new App Store app (iOS)
For your App Store App configuration you will need your App Bundle ID as well as your In-app purchase key configuration. You can find both pieces of information below: Business and Enterprise customers may request both values by creating a support ticket within App Studio, as our team will help with the setup and management of App Store Connect and the App Identifiers.
New App Store app configuration form in RevenueCat

RevenueCat: new App Store app

Step 1.2: Create a new Play Store configuration (Android)
For your Play Store configuration you will need your Google Play package name as well as your Service account credentials. You can find both pieces of information below: Business and Enterprise customers may request both values by creating a support ticket within App Studio, as our team will help with the setup and management of Google Firebase and the App Identifiers.
New Play Store configuration form in RevenueCat

RevenueCat: new Play Store configuration

Step 2: Retrieve your RevenueCat API key

You must initialize the SDK using your public API key. RevenueCat provides a test API key by default so you can validate purchases before going live.
SDK API keys in the RevenueCat dashboard

RevenueCat: SDK API keys

Step 3: Set up your products

Follow the steps in the official RevenueCat product configuration guide to review your Test Store products, or set up or import real store products.

App configuration

Enable the RevenueCat plugin in the Native Plugins tab as shown below. The plugin does not require configuration fields because initialization happens at runtime using the JavaScript Bridge API.
RevenueCat plugin enabled in the Native Plugins tab in App Studio

RevenueCat plugin enablement

JavaScript Bridge functions

SDK initialization

To use the RevenueCat plugin, initialize it with your public apiKey and appUserID. References to both can be found in the RevenueCat documentation. The appUserID will allow you to reference users in the RevenueCat dashboard, via the API, as well as in the webhooks and other integrations. Provide a callback function or return a promise.
Parameters
string
required
Your RevenueCat public SDK API key. RevenueCat provides a test API key by default so you can validate purchases before going live.
string
A unique identifier for the user in RevenueCat. Use this to reference the user in the RevenueCat dashboard, REST API, webhooks, and other integrations.
boolean
Enables Apple Ads (AdServices) attribution collection when the SDK is configured. See Attribution for details and for the option to enable attribution after initialization.
Apple Search Ads attribution is iOS-only. On Android this parameter has no effect.
Response
boolean
required
true if the SDK was configured successfully, otherwise false.
Response

Verify SDK initialization

Verify the SDK is initialized before calling any other methods. Provide a callback function or return a promise.
Response
boolean
required
true if the SDK has been initialized, otherwise false.
string
The API key used to initialize the SDK. Only returned when initialized is true.
Response

Retrieve offerings

Fetch available in-app products, subscriptions, and offerings from RevenueCat.
Response
string[]
required
The identifiers of the packages available in the current offering.
Response

Make a purchase

Trigger an in-app purchase using a product identifier. Provide a callback function or return a promise.
Parameters
string
required
The identifier of the product to purchase, as returned by getOfferings().
Response
boolean
required
true if the purchase completed successfully, otherwise false.
Response

Restore purchases

Restore a user’s previously purchased products and subscriptions. Provide a callback function or return a promise.
Response
boolean
required
true if purchases were restored successfully, otherwise false.
Response

Present a paywall

Present a paywall that has been configured through the RevenueCat platform. Please follow the RevenueCat: Creating paywalls guide for style and configuration references.
This function provides a callback and will return an error if the user cancels the paywall.

Enable AdServices attribution

Enable Apple Ads (AdServices) attribution collection after the SDK has been initialized. On Android, this call returns a “not supported” response because Apple Search Ads attribution is iOS-only.
JavaScript
Response
boolean
required
true if AdServices attribution was enabled successfully, otherwise false. Always false on Android, where attribution is not supported.
object
Returned when success is false.
Response

Get attribution status

Check whether AdServices attribution is supported on the current device and whether it is currently enabled. On Android, this call responds with supported: false because Apple Search Ads attribution is iOS-only.
JavaScript
Response
boolean
required
true if AdServices attribution is supported on the current device or platform, otherwise false. Always false on Android.
boolean
required
true if AdServices attribution is currently enabled, otherwise false.
Response

Ad Attribution

Attribution lets RevenueCat associate purchases with the campaigns that drove them. The plugin supports Apple Ads (AdServices) attribution on iOS.
Platform support The enableAdServices() and getStatus() methods are available on both iOS and Android, so you can call them without checking the platform first.Apple Search Ads attribution is iOS-only, so on Android these calls respond that attribution is not supported instead of leaving the call hanging.
You can enable AdServices attribution in either of two ways:
  • Pass enableAdServicesAttribution: true to median.revenueCat.configure() when initializing the SDK.
  • Call median.revenueCat.attribution.enableAdServices() after the SDK has been initialized.

Frequently asked questions

Median maintains its own RevenueCat account for development and QA purposes only.Median does not manage your RevenueCat configuration, product setup, or App Store or Google Play metadata. If you run into issues, consult RevenueCat’s official troubleshooting documentation: RevenueCat: Troubleshooting the SDKs
Paywalls are often one of the most closely reviewed parts of an app during App Store and Google Play review.Both platforms require apps to clearly communicate what users receive before they are asked to pay, ensuring expectations are transparent and not misleading.When configuring your payment options and paywalls, carefully follow RevenueCat’s guidance to improve your chances of approval: RevenueCat: Getting your paywall approved through app review
Last modified on December 3, 2026