> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# RevenueCat

> 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.

> [!TIP]
>
> **Developer Demo**
>
> Display our demo page in your app to test during development [https://median.dev/revenue-cat](https://median.dev/revenue-cat)

## 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](https://mintcdn.com/median-co/dZQPJ_0wlG7WNBTy/images/docs/4b0f5e17cdc162cefc2eaabc1c9bf2c21ead2950226fc08f1481fd89a1cb26ee-Screenshot_2025-12-10_at_15.03.09.png?fit=max\&auto=format\&n=dZQPJ_0wlG7WNBTy\&q=85\&s=c2fc7d45b871e51506069cd808f81788)

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:

* App Bundle ID: [iOS Bundle ID](https://docs.median.co/docs/app-identifiers.md#ios-bundle-id)
* In-app purchase key configuration: [Generate keys for In-App Purchases](https://developer.apple.com/help/app-store-connect/configure-in-app-purchase-settings/generate-keys-for-in-app-purchases/)

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](https://mintcdn.com/median-co/dZQPJ_0wlG7WNBTy/images/docs/2e2ba192e6c99bd1a0a66497acdbe90c5b657f2ada7cd66fb9f8e83c99e7a09d-Screenshot_2025-12-10_at_15.06.44.png?fit=max\&auto=format\&n=dZQPJ_0wlG7WNBTy\&q=85\&s=037a1199896ad9ec5dea11209752d8a4)

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:

* Google Play package name: [Android Package Name](https://docs.median.co/docs/app-identifiers.md#android-package-name)
* Service Account Credentials: [Google Services](https://docs.median.co/docs/google-services.md)

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](https://mintcdn.com/median-co/TpSItjrYpkPK-i0N/images/docs/d0c86e44ab9934ced6c22ffce97688c08c2e91d53b908361afd79710493be433-Screenshot_2025-12-10_at_15.07.06.png?fit=max\&auto=format\&n=TpSItjrYpkPK-i0N\&q=85\&s=8eb69116c45a920fb1c1a4463a4fc12e)

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](https://mintcdn.com/median-co/yvThAkXSLqPa6nzP/images/docs/f4d86b4a3b4fcbaa9cdfb7923f24f707b42080b309615eb645273b8b00d65dec-SDK_API_Key.png?fit=max\&auto=format\&n=yvThAkXSLqPa6nzP\&q=85\&s=9156c6ddd5b2f01e88cc8a2d8053d89f)

RevenueCat: SDK API keys

#### Step 3: Set up your products

Follow the steps in the official [RevenueCat product configuration guide](https://www.revenuecat.com/docs/offerings/products-overview) 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](https://mintcdn.com/median-co/yvThAkXSLqPa6nzP/images/docs/ec6746920219187e2ad318dd49614e6e03cc2c9607db722b5dce120be4da3ac0-Screenshot_2025-12-10_at_14.59.56.png?fit=max\&auto=format\&n=yvThAkXSLqPa6nzP\&q=85\&s=dd957429ff702a602e84a738696d3931)

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](https://www.revenuecat.com/docs/projects/authentication). 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.

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.revenueCat.configure({
  'apiKey': '<my_api_key>',
  'appUserID': '<my_app_user_id>'
})
// Return value:
{
  "success": true | false
}
```

#### Verify SDK initialization

Verify the SDK is initialized before calling any other methods. Provide a callback function or return a promise.

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.revenueCat.isInitialized({'callback': function});
// Return value:
{
  'initialized': true | false,
  'apiKey': STRING // available only if initialized is true
}
```

#### Retrieve offerings

Fetch available in-app products, subscriptions, and offerings from RevenueCat.

Provide a callback function or return a promise.

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.revenueCat.getOfferings()
// Return value:
{
  "identifiers": ["$subscription_monthly","$subscription_annual","$subscription_lifetime"]
}
```

#### Make a purchase

Trigger an in-app purchase using a product identifier.

Provide a callback function or return a promise.

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.revenueCat.purchase({'identifier':STRING})
// Return value:
{
  "success": true | false
}
```

#### Restore purchases

Restore a user's previously purchased products and subscriptions.

Provide a callback function or return a promise.

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.revenueCat.restorePurchases()
// Return value:
{
  "success": true | false
}
```

#### Present a paywall

Present a paywall that has been configured through the RevenueCat platform. Please follow the [RevenueCat: Creating paywalls](https://www.revenuecat.com/docs/tools/paywalls/creating-paywalls) guide for style and configuration references.

Median JavaScript Bridge

```javascript JavaScript  theme={null}
median.revenueCat.presentPaywall(); 
```

This function provides a callback and will return an error if the user cancels the paywall.

## Troubleshooting

### Can Median manage my RevenueCat configuration?

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](https://www.revenuecat.com/docs/test-and-launch/debugging/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](https://www.revenuecat.com/docs/tools/paywalls/creating-paywalls/app-review)


## Related topics

- [App monetization](https://docs.median.co/docs/app-monetization.md)
- [Website builder overview](https://docs.median.co/docs/ai-app-builder-overview.md)
- [Integrations](https://docs.median.co/docs/integrations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.