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

# RevenueCat Overview

> In-app subscriptions made easy with cross-platform support

RevenueCat is a subscription management platform that simplifies in-app purchases across iOS, Android, and web.

## What's Included

Launch includes a ready-to-use RevenueCat integration:

* **RevenueCat Provider** - Context for subscription state
* **Native Paywall** - Uses RevenueCat's visual paywall builder
* **Entitlement Checking** - `useRevenueCat()` hook
* **Restore Purchases** - Built-in restore functionality

## Why RevenueCat?

<CardGroup cols={2}>
  <Card title="Native Paywalls" icon="mobile">
    Design paywalls in RevenueCat's dashboard — no code changes needed.
  </Card>

  <Card title="Cross-Platform" icon="arrows-rotate">
    Sync subscriptions between iOS, Android, and web.
  </Card>

  <Card title="Analytics" icon="chart-line">
    Built-in dashboards for revenue and subscriber metrics.
  </Card>

  <Card title="A/B Testing" icon="flask">
    Test different paywalls and pricing without app updates.
  </Card>
</CardGroup>

## How It Works

```
App Store Connect          RevenueCat               Your App
─────────────────         ──────────────           ─────────
  Products &       ──▶    Syncs products    ──▶    Fetches offerings
  Subscriptions           Manages entitlements     Shows paywall
                          Validates receipts       Checks access
```

1. **App Store Connect** - Create your subscription products
2. **RevenueCat** - Import products, create offerings, design paywalls
3. **Your App** - Display paywall, check subscription status

## Usage

### Check Subscription Status

```tsx theme={null}
import { useRevenueCat } from "@/lib/payments/revenuecat";

function MyComponent() {
  const { isSubscribed, subscriptionStatus } = useRevenueCat();

  if (isSubscribed) {
    return <PremiumContent />;
  }
  return <UpgradePrompt />;
}
```

### Navigate to Paywall

```tsx theme={null}
import { useRouter } from "expo-router";

function UpgradeButton() {
  const router = useRouter();

  return (
    <Button onPress={() => router.push("/payments/revenuecat")}>
      Upgrade to Pro
    </Button>
  );
}
```

## File Structure

```
apps/mobile/lib/payments/
├── config.ts              # API keys and env helpers
├── revenuecat/
│   ├── provider.tsx       # RevenueCatProvider context
│   └── index.ts           # Exports
└── types.ts               # Shared types

apps/mobile/app/payments/
└── revenuecat.tsx         # Paywall screen (uses RevenueCat UI)
```

## Test Checklist

* Offerings load in the paywall
* Sandbox purchase succeeds
* Entitlement state updates in-app

## Troubleshooting

See [RevenueCat Troubleshooting](/payments/revenuecat-troubleshooting).

## Remove / Disable

To disable RevenueCat while you configure products, set:

`apps/mobile/features/feature-registry.tsx` → `featureFlags.payments = false`

For production removal guidance, see [Removing Features](/essentials/removing-features).

## Next Steps

<CardGroup cols={2}>
  <Card title="Setup Guide" icon="wrench" href="/payments/revenuecat-setup">
    Configure App Store Connect and RevenueCat
  </Card>

  <Card title="Troubleshooting" icon="bug" href="/payments/revenuecat-troubleshooting">
    Common errors and solutions
  </Card>
</CardGroup>
