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

# RevenueCat Setup

> Add in-app purchases and subscriptions to your Vibecode app with RevenueCat

Ready to monetize your app? Vibecode integrates with [RevenueCat](https://www.revenuecat.com/) to handle in-app purchases and subscriptions. This guide walks you through the complete setup process.

<iframe src="https://www.youtube.com/embed/WcpOuc9TMp8" 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 />

## Before You Start

You'll need the following:

* [**Vibecode Pro Plan**](/getting-started/plans-and-credits) (upgrade in your account settings if needed)
* [**RevenueCat Account**](https://www.revenuecat.com/) (sign up for free)
* [**Apple Developer Program Membership**](https://developer.apple.com/programs/) (\$99/year)

## Step 1: Connect Your RevenueCat Account

1. Open your project in Vibecode
2. Click the **Payments** tab

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/payments-tab.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=d52faee9cb592333c304f2a148d0579c" alt="Payments tab" style={{maxHeight: '250px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="985" height="652" data-path="payments/payments-tab.png" />

3. Click **Connect RevenueCat**
4. Sign into your RevenueCat account in the popup
5. Authorize Vibecode to access your account
6. You'll be redirected back automatically

<Tip>If the popup is blocked, check your browser's popup settings and try again.</Tip>

## Step 2: Configure Your App Identity

After connecting, you'll set up your app identity:

1. **Display Name** - Your app's name as it appears on the home screen
2. **Bundle Identifier** - A unique identifier for your app (Vibecode auto-generates one)

<Warning>Your Bundle Identifier cannot be changed after your first build. Choose carefully!</Warning>

Click **Continue** to complete the setup.

## Step 3: Configure RevenueCat Credentials

<Note>This step is critical! Without these credentials, your in-app purchases will not work.</Note>

For RevenueCat to communicate with App Store Connect, you need to set up two API keys in your RevenueCat dashboard:

### App Store Connect API Key

1. Go to [App Store Connect](https://appstoreconnect.apple.com/) → **Users and Access** → **Integrations** → **App Store Connect API**
2. Click **Generate API Key** with "App Manager" access level
3. Download the `.p8` file (you can only download this once!)
4. Note your **Issuer ID** from this page
5. In RevenueCat, go to your app's settings and upload the `.p8` file
6. Enter your Issuer ID and Vendor number (found in App Store Connect under **Payments and Financial Reports**)

<Card title="App Store Connect API Key Configuration" icon="book" href="https://www.revenuecat.com/docs/service-credentials/itunesconnect-app-specific-shared-secret/app-store-connect-api-key-configuration">
  Full Guide
</Card>

### In-App Purchase Key

1. Go to [App Store Connect](https://appstoreconnect.apple.com/) → **Users and Access** → **Integrations** → **In-App Purchase**
2. Click **Generate In-App Purchase Key**
3. Download the `.p8` file (you can only download this once!)
4. In RevenueCat, upload this key in the **In-app purchase key configuration** section
5. Add your Issuer ID and save

<Card title="In-App Purchase Key Configuration" icon="book" href="https://www.revenuecat.com/docs/service-credentials/itunesconnect-app-specific-shared-secret/in-app-purchase-key-configuration">
  In-App Purchase Key Configuration
</Card>

<Warning>The In-App Purchase key is required. Without it, transactions will fail to be recorded when using StoreKit 2.</Warning>

## Step 4: Create Your Product with AI

Ask the Vibecode AI to create your subscription or in-app purchase product:

**Example prompts:**

<CodeGroup>
  ```text Monthly Subscription theme={null}
  Create a monthly premium subscription for $4.99
  ```

  ```text Yearly with Trial theme={null}
  Add a yearly subscription with a 7-day free trial
  ```

  ```text One-Time Purchase theme={null}
  Create a one-time purchase to remove ads for $2.99
  ```
</CodeGroup>

The AI will create the product in RevenueCat for you.

## Step 5: Create a Paywall

Ask the AI to create a paywall screen for your app:

**Example prompts:**

<CodeGroup>
  ```text Basic Paywall theme={null}
  Create a paywall screen showing my subscription options
  ```

  ```text Premium Upgrade theme={null}
  Add a premium upgrade screen with monthly and yearly options
  ```

  ```text Feature Gate theme={null}
  Show a paywall when users try to access pro features
  ```
</CodeGroup>

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/paywall-example.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=3e24d1963a2c17dc5a223067ffad92a1" alt="Paywall example" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="968" height="1882" data-path="payments/paywall-example.png" />

## Step 6: Test in Vibecode

Before publishing, test your paywall inside Vibecode:

1. Preview your app
2. Navigate to where the paywall appears
3. Verify the products display correctly
4. Test the purchase flow

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/test-store.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=70f88970e9cffe7ae9dc5a9d79d6f8c3" alt="Test store" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="968" height="1882" data-path="payments/test-store.png" />

## Step 7: Sync Product with App Store Connect

<Note>This step creates your product in App Store Connect. You must complete this before your app can accept real payments.</Note>

Tell the AI to sync your product with App Store Connect:

**Example prompts:**

<CodeGroup>
  ```text Sync Products theme={null}
  Sync my RevenueCat products with App Store Connect
  ```

  ```text Publish Subscription theme={null}
  Publish my subscription to App Store Connect
  ```
</CodeGroup>

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/prompt-to-sync-products.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=cffa282142e048b33cc8d9ddea689567" alt="Sync products prompt" style={{maxHeight: '250px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="772" height="390" data-path="payments/prompt-to-sync-products.png" />

This creates the corresponding product in your App Store Connect account.

## Step 8: Complete Product Setup in App Store Connect

Your product was created but needs additional metadata before it can go live:

1. Go to [App Store Connect](https://appstoreconnect.apple.com/)
2. Click on your app in the bottom left
3. Navigate to **Monetization** → **Subscriptions** (or **In-App Purchases**)
4. Click on the subscription group that was created
5. Select your product

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/app-store-connect-subscriptions-page.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=12fb9532b7ad4a7c69d82305fd7de5dd" alt="App Store Connect subscriptions page" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="3540" height="2252" data-path="payments/app-store-connect-subscriptions-page.png" />

### Add Required Metadata

For each product, you need to add:

* **Display Name** - What users see during purchase
* **Description** - Explain what the subscription includes
* **Screenshot** - A screenshot showing your subscription in action

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/asc-missing-metadata.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=5c85bf2e13b9772e9b4dc3b9ac3de946" alt="App Store Connect missing metadata" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="3496" height="2208" data-path="payments/asc-missing-metadata.png" />

<img src="https://mintcdn.com/vibecodeapp/JQrqIQnbuDoPhy-U/payments/asc-paywall-screenshot.png?fit=max&auto=format&n=JQrqIQnbuDoPhy-U&q=85&s=2ba91fb72924583c66b7c78df3406240" alt="App Store Connect paywall screenshot" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="3504" height="2195" data-path="payments/asc-paywall-screenshot.png" />

<Note>Your product will show "Missing Metadata" status until you add all required information including the screenshot.</Note>

Once all metadata is complete, the status will change and your product is ready for submission.

## Troubleshooting

There are many common issues that can prevent your products from working correctly. Please go through all of them and make sure they do not impact you.

**Can't connect to RevenueCat?**

* Check that popups aren't blocked in your browser
* Try refreshing the page and connecting again
* Ensure you're signed into your RevenueCat account

**Products not showing up?**

* Click **Refresh** in the Payment Dashboard
* Verify products are created in both App Store Connect and RevenueCat
* Check that products are linked to the correct app in RevenueCat

**Product shows "Missing Metadata"?**

* Go to App Store Connect and add all required fields
* Make sure to upload a screenshot for the product
* Save your changes and the status will update

**Purchases failing in testing?**

* Ensure you're using a valid Sandbox Tester account
* Sign out of your regular Apple ID first
* Check that your app's bundle ID matches App Store Connect

**Products not appearing in TestFlight?**

When subscriptions or in-app purchase products don't appear in TestFlight, it's usually due to an incomplete setup in App Store Connect—missing legal entity information and incomplete agreements or tax information.

<img src="https://mintcdn.com/vibecodeapp/Nhtmc42THUQIP_4s/payments/asc-legal.png?fit=max&auto=format&n=Nhtmc42THUQIP_4s&q=85&s=bd08275ec50aafb766bf161c6101bf22" alt="App Store Connect Business Agreements" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="1280" height="844" data-path="payments/asc-legal.png" />

To fix this:

* Go to [App Store Connect](https://appstoreconnect.apple.com/) → **Business** → **Agreements**
* Ensure your **Paid Apps Agreement** is active (not "New")
* Complete any pending legal entity information
* Fill out all required tax and banking information
* Make sure to also fill out all the metadata for your products in App Store Connect. You can do this by going to App -> Subscriptions -> Your Subscription -> Edit -> Metadata.

**Pending agreements blocking purchases?**

If you see a yellow warning banner in App Store Connect about updated agreements, you must clear all pending agreements before RevenueCat can process purchases.

<img src="https://mintcdn.com/vibecodeapp/ZmiNAmHfQeMkut3S/payments/asc-agreements.png?fit=max&auto=format&n=ZmiNAmHfQeMkut3S&q=85&s=6b8781741f762eeb4c096e3eb080cb9c" alt="App Store Connect pending agreements warning" style={{maxHeight: '400px', display: 'block', margin: '0 auto'}} className="rounded-lg" width="2940" height="2152" data-path="payments/asc-agreements.png" />

To fix this:

* The **Account Holder** (not just any team member) must sign in to App Store Connect
* Review and accept any updated license agreements shown in the yellow banner
* Check **Business** → **Agreements** for any other pending agreements
* Once all agreements are accepted, the yellow warning will disappear and purchases will work
