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

# How to add a paywall to your Rork app with RevenueCat

> Are you ready to add payments to your app? Use this guide to setup Rork with RevenueCat paywall and deploy your app to Production with a full feature gated payment system! 

export const CtaBanner = () => <div style={{
  display: "flex",
  alignItems: "center",
  justifyContent: "space-between",
  gap: "24px",
  flexWrap: "wrap",
  margin: "40px 0 8px",
  padding: "22px 28px",
  borderRadius: "16px",
  background: "linear-gradient(135deg,rgba(249,115,22,0.10),rgba(255,255,255,0.03),rgba(249,115,22,0.06))",
  border: "1px solid rgba(255,255,255,0.08)"
}}>
    <div>
      <div style={{
  fontSize: "19px",
  fontWeight: 700,
  color: "#fff",
  letterSpacing: "-0.3px",
  lineHeight: 1.3
}}>
        Build your app with Rork today.
      </div>
      <div style={{
  fontSize: "14px",
  color: "rgba(255,255,255,0.6)",
  marginTop: "4px",
  lineHeight: 1.5
}}>
        Ship iOS, Android, and web apps by chatting with AI.
      </div>
    </div>
    <a href="https://rork.com" style={{
  flexShrink: 0,
  display: "inline-block",
  padding: "10px 24px",
  background: "linear-gradient(135deg,#fff,#f0f0f0)",
  color: "#000",
  fontSize: "14px",
  fontWeight: 600,
  borderRadius: "100px",
  textDecoration: "none",
  whiteSpace: "nowrap"
}}>
      Try Rork for Free
    </a>
  </div>;

<iframe src="https://www.youtube.com/embed/nJe4jK2jk8A" title="YouTube video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

# Step-by-Step Tutorial: RevenueCat in a Rork App (End-to-End)

## 1) Build your app in Rork

1. Write your prompt (example from video: "note-taking calorie tracker with AI calorie estimate").
2. Submit prompt → Rork builds the app.
3. If you think of additional features mid-build (e.g., "scan your meal"), add them to the **queue** so Rork can handle them after the first prompt.

## 2) Connect RevenueCat inside Rork

1. In Rork, go to **Integrations**.
2. Click **Connect with RevenueCat**.
3. Log in / sign up in RevenueCat.
4. Authorize Rork to access your RevenueCat account.
5. Click **Create new project** in RevenueCat.
   * Name it whatever you want (e.g., "Calorie Tracker").
6. Go back to Rork **chatbot** and say:\
   **"Set up RevenueCat."**
7. Rork will set up:
   * Offerings
   * Products
   * Entitlements
   * Environment variables / API keys
8. When Rork asks to set environment variables → click **Yes**.

## 3) Test purchases in RevenueCat Test Store (sandbox inside RC)

1. In the Rork app, tap the subscription (example: **\$40/year**).
2. You'll see options like:
   * Test a valid purchase
   * Test failed purchase
3. Tap **Test valid purchase**.
4. In the RevenueCat dashboard → **Overview** → toggle **Sandbox data**.
5. If you see sandbox MRR / the subscription (ex: \$40/year), then:\
   ✅ Rork + RevenueCat Test Store are connected.

> Note: These are NOT real App Store subscriptions yet.

<img src="https://mintcdn.com/rork/q1v-Ti5Cxse1Bnho/images/image-42.png?fit=max&auto=format&n=q1v-Ti5Cxse1Bnho&q=85&s=87ed1adb9594d27915fae42c9394f5ab" alt="Image" width="926" height="1058" data-path="images/image-42.png" />

## 4) Push the app to TestFlight (required for real Apple IAP)

1. In Rork, go to **Get users → Submit to TestFlight**.
2. Click **New submission**.
3. (Optional but recommended) Generate an app icon using Rork.
4. Fill out **Apple Developer** information when prompted.
5. Submit and wait for the build/upload to complete.
6. Go to **App Store Connect**. Complete the required compliance info so the build is testable.

<img src="https://mintcdn.com/rork/9dugVw3lXoCUEaZ5/images/image-31.png?fit=max&auto=format&n=9dugVw3lXoCUEaZ5&q=85&s=f782a8edef80b6cc89d7653d53562ec8" alt="Image" width="1726" height="952" data-path="images/image-31.png" />

## 5) Create subscriptions in App Store Connect (real products)

### Create a Subscription Group

1. App Store Connect → **Subscriptions**
2. Create **Subscription Group**
   * Name it something simple (example: "Subscriptions")

<img src="https://mintcdn.com/rork/9dugVw3lXoCUEaZ5/images/image-32.png?fit=max&auto=format&n=9dugVw3lXoCUEaZ5&q=85&s=c535300c609e87f11030b71ce8358885" alt="Image" width="1862" height="1006" data-path="images/image-32.png" />

### Create monthly subscription (repeat for yearly)

1. Create **Subscription**
2. Set:
   * Reference name: "Monthly subscription."
   * Product ID: "monthly\_subscription" (or same name)
3. Configure required metadata:
   * Duration: **1 month**
   * Availability: **Everywhere**
   * Price: example **\$4.99/month**
4. Add localization:
   * Display name: "Monthly subscription."
5. Add a screenshot/image of your paywall (required for submission readiness)
6. Submit / Save
7. Repeat the same steps for **Yearly**.

✅ After this, products should be "Ready to submit" in App Store Connect.

<img src="https://mintcdn.com/rork/P4nDSAqEpPvwFOIk/images/image-33.png?fit=max&auto=format&n=P4nDSAqEpPvwFOIk&q=85&s=94bd4f67c5e9020027c2268337a332c6" alt="Image" width="2810" height="1096" data-path="images/image-33.png" />

## 6) Connect App Store Connect to RevenueCat (so products sync)

RevenueCat → **Apps → iOS app**

<img src="https://mintcdn.com/rork/P4nDSAqEpPvwFOIk/images/image-33.png?fit=max&auto=format&n=P4nDSAqEpPvwFOIk&q=85&s=94bd4f67c5e9020027c2268337a332c6" alt="Image" width="2810" height="1096" data-path="images/image-33.png" />

### Add App Info

1. Copy your **Bundle ID** from App Store Connect into RevenueCat.

### Add In-App Purchase Key

1. App Store Connect → **Users and Access → Integrations**
2. Under **In-App Purchase**, click the **+**
3. Name it (example: "RevenueCat Calorie Tracker")
4. Download the key file
5. Upload/drag into RevenueCat
6. Copy **Issuer ID** (above the integration keys list) → paste into RevenueCat

<img src="https://mintcdn.com/rork/P4nDSAqEpPvwFOIk/images/image-34.png?fit=max&auto=format&n=P4nDSAqEpPvwFOIk&q=85&s=3ac70aa10e8d899779e6a80e5c5aab92" alt="Image" width="2366" height="1640" data-path="images/image-34.png" />

### Add App Store Connect API Key

1. Still in **Users and Access → Integrations**
2. Create **App Store Connect API** key
3. Download it → upload into RevenueCat
4. Enter **Issuer ID** again

<img src="https://mintcdn.com/rork/w9FG0FmJZOc-8uwZ/images/image-35.png?fit=max&auto=format&n=w9FG0FmJZOc-8uwZ&q=85&s=f7d32fe251089dcf468d50c546f2a13e" alt="Image" width="2398" height="684" data-path="images/image-35.png" />

### Add Vendor Number

1. App Store Connect → **Reports** (Business section)
2. The top left shows the **Vendor Number**
3. Copy → paste into RevenueCat

### Enable server-to-server notifications (recommended)

* Toggle: **Track new purchases from server-to-server notifications**

### Add App-Specific Shared Secret

1. App Store Connect → **Apps → Your app → App Information**
2. Scroll to **App-Specific Shared Secret**
3. Click **Manage → Generate**
4. Copy secret → paste into RevenueCat
5. Click **Save changes** in RevenueCat

✅ Now: Apple ↔ RevenueCat is connected.

## 7) Import your App Store products into RevenueCat

1. RevenueCat → **Product Catalog**
2. Choose **Default** (or your active catalog)
3. Click **Add new product → Import products**
4. Select the monthly + yearly products → **Import**
5. For each imported product:
   * Attach an **Entitlement** (same entitlement for both is common)

<img src="https://mintcdn.com/rork/w9FG0FmJZOc-8uwZ/images/image-35.png?fit=max&auto=format&n=w9FG0FmJZOc-8uwZ&q=85&s=f7d32fe251089dcf468d50c546f2a13e" alt="Image" width="2398" height="684" data-path="images/image-35.png" />

## 8) Attach products to your RevenueCat Offering

1. RevenueCat → **Offerings → Default**
2. Click **Edit**
3. Attach each App Store product to the correct package
4. Click **Save**

## 9) Final test: TestFlight purchase

1. Install your app via **TestFlight**
2. Open your paywall in-app
3. Your subscriptions should now be purchasable via TestFlight and in production after release.

# Common Issues:

* Make sure all of your Agreements/Bank information is active. (Your subscriptions will not work if this isn't set up

<img src="https://mintcdn.com/rork/AEPKvEFVjupMI6Bi/images/image-40.png?fit=max&auto=format&n=AEPKvEFVjupMI6Bi&q=85&s=b3467f1eae36c481ea7895266a235dcb" alt="Image" width="1958" height="1090" data-path="images/image-40.png" />

* App store public api key isn't set properly.

<img src="https://mintcdn.com/rork/q1v-Ti5Cxse1Bnho/images/image-41.png?fit=max&auto=format&n=q1v-Ti5Cxse1Bnho&q=85&s=dee42ea2395ec097c8f4bd79905ce0dc" alt="Image" width="1932" height="580" data-path="images/image-41.png" />

* Just give this key to Rork and say, "Make sure Apple and RevenueCat are connected".

## What to do next:

After adding a paywall, you will still be rejected from the App Store  if you do not have a privacy policy, terms and conditions, and a visible EULA.\
\
In your App Store description, make sure to mention that every feature requires a paid subscription if you are hard paywalling your app. If you do not, Apple will reject you.

[How to create policies?](make-your-app-profitable/paywalls/how-to-set-up-your-policies.mdx)

<CtaBanner />
