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

# RevenueCat integration

> Connect RevenueCat to FunnelFox for cross-platform subscription management. Sync web purchases with your mobile app subscriptions.

The RevenueCat integration creates a customer profile for every paying user at checkout and records their initial subscription transaction.

RevenueCat then tracks renewals, expirations, and refunds, automatically managing access and revenue metrics.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7oAh94OR0YwiQ1IQ/assets/revenuecat-integration.png?fit=max&auto=format&n=7oAh94OR0YwiQ1IQ&q=85&s=81f1dfcea71115f67675d175b4580eb2" alt="RevenueCat integration settings" width="1920" height="879" data-path="assets/revenuecat-integration.png" />
</Frame>

## How it works

When a user completes a subscription purchase in your funnel:

1. **Profile creation**: FunnelFox creates a RevenueCat customer with the [App User ID](/integrations/subscription-management/revenuecat#user-id).
2. **Purchase tracking**: The initial subscription purchase is sent to RevenueCat.
3. **Ongoing monitoring**: RevenueCat monitors the subscription directly
   with Stripe/Paddle for renewals, cancellations, and revenue events.
4. **App verification**: Your app checks subscription status through the
   RevenueCat SDK.

<Warning>Transactions for one-time (one-off) purchases are not sent to RevenueCat.</Warning>

<Note>
  One-time purchases create profiles **only if an entitlement is configured**.

  FunnelFox checks for an entitlement in the Checkout element first. If none is found, it checks [Integrations > RevenueCat](https://app.funnelfox.com/integrations/revenuecat). If there’s still no entitlement, no profile is created and access isn’t granted.
</Note>

## Setup

Choose your integration method based on your payment setup:

* [FunnelFox](/integrations/subscription-management/revenuecat#funnelfox): If you use Stripe or Paddle as your payment provider.
* [FunnelFox Billing](/integrations/subscription-management/revenuecat#funnelfox-billing): If you use FunnelFox Billing instead of a direct payment provider integration.

### FunnelFox

<Steps>
  <Step title="Get RevenueCat API keys">
    1. Log into [RevenueCat Dashboard](https://app.revenuecat.com).
    2. Go to **Project Settings** → **API Keys**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/GhSKbSE-cJ7i5hMv/assets/revenuecat-api-keys.png?fit=max&auto=format&n=GhSKbSE-cJ7i5hMv&q=85&s=c1c488aed89876444683fbdf4766c4ed" alt="RevenueCat API keys settings" width="3292" height="2484" data-path="assets/revenuecat-api-keys.png" />
    </Frame>

    3. Create a **Secret Key** with **API Version** set to **V1**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/GhSKbSE-cJ7i5hMv/assets/revenuecat-secret-key.gif?s=bc826fec52c7c02f50ffdf0442e6dc91" alt="Creating new Secret API Key" width="1280" height="720" data-path="assets/revenuecat-secret-key.gif" />
    </Frame>

    4. Copy the **Secret Key**.
  </Step>

  <Step title="Get payment provider app keys">
    <Tabs>
      <Tab title="Stripe">
        1. In RevenueCat, go to your app settings.
        2. Find the **Stripe App Key** (starts with `strp_`).
        3. Ensure **Track new purchases from server-to-server notifications**
           is disabled.
        4. Copy the **Stripe App Key**.
      </Tab>

      <Tab title="Paddle">
        1. In RevenueCat, find your Paddle app settings.
        2. Copy the **Production Paddle App Key** (starts with `pdl_`).
        3. Copy the **Sandbox Paddle App Key** for testing.

        <Note>Paddle requires separate keys for production and sandbox environments.</Note>

        <Frame>
          <img src="https://mintcdn.com/funnelfox/GhSKbSE-cJ7i5hMv/assets/revenuecat-paddle-sandbox.png?fit=max&auto=format&n=GhSKbSE-cJ7i5hMv&q=85&s=436cfc1c64ac4daa82659174b96d3354" alt="Paddle sandbox environment setup" width="3290" height="1204" data-path="assets/revenuecat-paddle-sandbox.png" />
        </Frame>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Configure FunnelFox integration">
    You only need to configure the app key for your active payment provider (Stripe or Paddle).

    <Tabs>
      <Tab title="Stripe">
        <Warning>
          Avoid using the **Legacy Setup** and **iOS App Key only** fields for new integrations.
          Use Stripe app key for full subscription tracking and revenue
          analytics.
        </Warning>

        1. Go to **Integrations** → **RevenueCat**.
        2. Paste your **Secret Key**.
        3. Paste your app key into **Public Stripe App Key**.
        4. Click **Save changes**.
      </Tab>

      <Tab title="Paddle">
        <Warning>
          Avoid using the **Legacy Setup** and **iOS App Key only** fields for new integrations.
          Use Paddle app key for full subscription tracking and revenue
          analytics.
        </Warning>

        1. Go to **Integrations** → **RevenueCat**.
        2. Paste your **Secret Key**.
        3. Paste your production app key into **Production Paddle App Key**.
        4. Paste your sandbox app key into **Sandbox Paddle App Key**.
        5. Click **Save changes**.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Map products to entitlements">
    After your first test purchase:

    1. Check the RevenueCat dashboard for the new customer.
    2. Map your Stripe/Paddle products to RevenueCat entitlements.
    3. Configure product identifiers to match your app.\\

    <Info>The example shows a `pro` entitlement mapped to a Stripe product.</Info>

    <Frame>
      <img src="https://mintcdn.com/funnelfox/GhSKbSE-cJ7i5hMv/assets/revenuecat-entitlement-mapping.png?fit=max&auto=format&n=GhSKbSE-cJ7i5hMv&q=85&s=20457202741f166806f286e2c54fe9a5" alt="Example pro entitlement mapped to a Stripe product" width="3304" height="2486" data-path="assets/revenuecat-entitlement-mapping.png" />
    </Frame>
  </Step>

  <Step title="Test the integration">
    * Open your funnel in preview mode.
    * Make a test purchase.
    * Verify the customer appears in RevenueCat.
    * Check that entitlements are granted correctly.
  </Step>
</Steps>

### FunnelFox Billing

Follow this section if you're using FunnelFox Billing instead of integrating directly with Stripe or Paddle.

<Info>You need a FunnelFox Billing account for this setup. Request our support team if you don't have one.</Info>

Open your [RevenueCat project](https://www.revenuecat.com/docs/projects/overview) and follow these steps:

<Steps>
  <Step title="Create app configuration in RevenueCat">
    1. Go to **Apps & providers** and click **New app configuration**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/s8eLSral2y8mf-KY/assets/new-app-config.png?fit=max&auto=format&n=s8eLSral2y8mf-KY&q=85&s=985c37d88c23150b6c35c9448afc11d3" width="3420" height="1880" data-path="assets/new-app-config.png" />
    </Frame>

    2. Click **Google Play Store**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/p9gcuMRJNy9LeWrb/assets/google-play-store.png?fit=max&auto=format&n=p9gcuMRJNy9LeWrb&q=85&s=c1e12ed2204b7cc7c0f0db08c722c5bf" width="3420" height="1932" data-path="assets/google-play-store.png" />
    </Frame>

    3. Name your app and Google Play package, then click **Save changes**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/s8eLSral2y8mf-KY/assets/name-app.png?fit=max&auto=format&n=s8eLSral2y8mf-KY&q=85&s=5900a7916e524c91d3b2e23ad0052072" width="3408" height="1942" data-path="assets/name-app.png" />
    </Frame>
  </Step>

  <Step title="Configure public API key">
    1. Copy the **Public API key**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/9aCh63vZSL6nYBI7/assets/rc-public-api-key.png?fit=max&auto=format&n=9aCh63vZSL6nYBI7&q=85&s=f8ead182b9dcd279e0661a3c902bcae8" width="3402" height="1942" data-path="assets/rc-public-api-key.png" />
    </Frame>

    2. Go to [Integrations > RevenueCat](https://app.funnelfox.com/integrations/revenuecat) in FunnelFox.

    3. Paste the key into the **Public iOS App Key** field. The key will also automatically appear under the **Legacy setup**.

    <Tip>Don't close the RevenueCat settings page in FunnelFox as you'll need it for the next steps.</Tip>

    <Frame>
      <img src="https://mintcdn.com/funnelfox/CL6JlZm0xbv0vPRH/assets/paste-rc-public-api-key.png?fit=max&auto=format&n=CL6JlZm0xbv0vPRH&q=85&s=823f30d49351ac22067254fb353f27c6" width="1920" height="879" data-path="assets/paste-rc-public-api-key.png" />
    </Frame>
  </Step>

  <Step title="Configure secret API key">
    1. Go back to your project in RevenueCat and click **API keys**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/9aCh63vZSL6nYBI7/assets/rc-go-api-keys.png?fit=max&auto=format&n=9aCh63vZSL6nYBI7&q=85&s=25d03c577ae80a77c494707982bca68c" width="3392" height="1930" data-path="assets/rc-go-api-keys.png" />
    </Frame>

    2. Click **+ New secret API key** at the top right.

    3. Enter API key details, then click **Generate**:

    * **Name**: Enter any name you like
    * **API version**: `V1`

    <Frame>
      <img src="https://mintcdn.com/funnelfox/9aCh63vZSL6nYBI7/assets/rc-api-key-generate.png?fit=max&auto=format&n=9aCh63vZSL6nYBI7&q=85&s=20ea4695164de50324e6bf23ebdebd2b" width="3402" height="1931" data-path="assets/rc-api-key-generate.png" />
    </Frame>

    4. Copy the **Secret API key**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/WPCI3Vchq_XZkt8G/assets/copy-secret-api-key.png?fit=max&auto=format&n=WPCI3Vchq_XZkt8G&q=85&s=60d435fcc60f66c0f81d3244c924e740" width="3420" height="1940" data-path="assets/copy-secret-api-key.png" />
    </Frame>

    5. Go back to RevenueCat settings in FunnelFox and paste the key into the **Secret Key** field.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/7oAh94OR0YwiQ1IQ/assets/rc-paste-secret-key.png?fit=max&auto=format&n=7oAh94OR0YwiQ1IQ&q=85&s=4e56a8071f3d6d7cde07be35f46144bb" width="1920" height="879" data-path="assets/rc-paste-secret-key.png" />
    </Frame>
  </Step>

  <Step title="Configure entitlement">
    1. In your RevenueCat project, go to **Product catalog** > **Entitlements**.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/9aCh63vZSL6nYBI7/assets/rc-product-catalog.png?fit=max&auto=format&n=9aCh63vZSL6nYBI7&q=85&s=13e663d5764e81afb650b8f6b624b3e0" width="3402" height="1920" data-path="assets/rc-product-catalog.png" />
    </Frame>

    2. Click **+ New Entitlement** on the right.

    3. Enter entitlement details, then click **Add**:

    * **Identifier**: `premium`
    * **Description**: Any description you like

    <Frame>
      <img src="https://mintcdn.com/funnelfox/9aCh63vZSL6nYBI7/assets/rc-entitlement.png?fit=max&auto=format&n=9aCh63vZSL6nYBI7&q=85&s=e934fab9ce24e83f6db1a10baad63c57" width="3340" height="1851" data-path="assets/rc-entitlement.png" />
    </Frame>

    4. Go back to RevenueCat settings in FunnelFox and enter the same identifier value `premium` into the **Default Entitlement** field.

    <Frame>
      <img src="https://mintcdn.com/funnelfox/sYmO5T3XqHCGfTpv/assets/default-entitlement.png?fit=max&auto=format&n=sYmO5T3XqHCGfTpv&q=85&s=689ec17a589657ea15a8a87946c1f1d9" width="1920" height="879" data-path="assets/default-entitlement.png" />
    </Frame>

    5. Click **Save changes**.
  </Step>
</Steps>

## Customer profile creation

### User ID

FunnelFox creates RevenueCat customers with an App User ID. The logic depends on when your FunnelFox project was set up:

<Tabs>
  <Tab title="FunnelFox projects created Nov 1, 2025 or later">
    <Note>
      Email is no longer used as the default App User ID for FunnelFox projects created after November 1, 2025.
    </Note>

    FunnelFox uses the following priority for creating the App User ID:

    1. **Custom input**: If you add an input element with the `_USERID_` element ID, its value becomes the App User ID.
    2. **From your backend**: When you fetch the user ID from your backend, set it using [custom code](/editor/coding) inside a Raw HTML element:

    ```
    <script>
        fox.inputs.set('_USERID_', yourGeneratedId)
    </script>
    ```

    3. **Profile-based ID (default)**: If none of the above are provided, FunnelFox uses `fnlfx_` + FunnelFox profile ID.
  </Tab>

  <Tab title="FunnelFox projects created before Nov 1, 2025">
    <Tip>If you want to switch to the new logic, reach out to your Customer Success Manager.</Tip>

    By default, FunnelFox uses the user's email as the App User ID. You can override this behavior following the priority below:

    1. **Custom input**: If you add an input element with the `_USERID_` element ID, its value becomes the App User ID.
    2. **From your backend**: When you fetch the user ID from your backend, set it using [custom code](/editor/coding) inside a Raw HTML element:

    ```
    <script>
        fox.inputs.set('_USERID_', yourGeneratedId)
    </script>
    ```

    3. **Email (default)**: If none of the above are provided, the user's email address is used as the App User ID.
    4. **Fallback**: If no email is collected, FunnelFox uses `fnlfx_` + FunnelFox profile ID.
  </Tab>
</Tabs>

<Info>
  Unlike Adapty, RevenueCat integration doesn't support URL parameters for existing customer IDs. Users must be identified through your app.
</Info>

### User attributes

FunnelFox sets the following attributes in RevenueCat customers:

| Attribute              | Value        | Description                     |
| ---------------------- | ------------ | ------------------------------- |
| **email**              | User's email | If collected in the funnel      |
| **fnlfx\_profile\_id** | Profile ID   | FunnelFox's internal profile ID |

## User identification

Your app needs to identify users and check their subscription status. For example:

```typescript React Native theme={null}
import Purchases from 'react-native-purchases';

//...

// After the user logs in, identify them with their App User ID
// Use the same ID FunnelFox created in RevenueCat
const { customerInfo, created } = await Purchases.logIn(appUserId);
const hasActive = !!customerInfo.entitlements.active["premium"];
// Update UI or grant features based on hasActive
```

<Warning>
  The email used in `logIn()` must match the email collected in your FunnelFox
  funnel. This links the web purchase to the app user.
</Warning>

<Info>
  Learn about user identification for iOS, Android, and more in [RevenueCat's documentation](https://www.revenuecat.com/docs/customers/identifying-customers).
</Info>
