📚 Welcome to the new Median docs! We've moved to a new documentation platform and some page URLs have changed, so please update your bookmarks. Spot a broken link or missing page? Contact support or raise an issue on GitHub.
Add in-app purchases, subscriptions, and paywalls to your iOS and Android app with RevenueCat and the JavaScript Bridge.
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.
Start by adding your iOS and Android apps in RevenueCat under Apps & Providers.
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.
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.
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.
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.
Verify the SDK is initialized before calling any other methods. Provide a callback function or return a promise.
median.revenueCat.isInitialized({'callback': function});// Return value:{ 'initialized': true | false, 'apiKey': STRING // available only if initialized is true}
Present a paywall that has been configured through the RevenueCat platform. Please follow the RevenueCat: Creating paywalls guide for style and configuration references.
median.revenueCat.presentPaywall();
This function provides a callback and will return an error if the user cancels the paywall.
Median maintains its own RevenueCat account for development and QA purposes only. However, 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
What are the App Review implications when using paywalls?
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