> This page is for For Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://whop.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://whop.ferndocs.com/_mcp/server.

# Installation

> Install the WhopCheckout SDK and configure it with an iap:read API key

Whop's iOS SDKs are distributed as separate Swift packages — **WhopCheckout** for payments and **WhopElements** for embedded chat and payouts. Install only what you need.

## WhopCheckout (In-App Purchases)

The WhopCheckout package handles subscriptions and payments in your app.

### Step 1: Add Package Dependency

In Xcode, go to **File** → **Add Package Dependencies...**

Enter the package URL:

```
https://github.com/whopio/whopsdk-checkout-swift
```

### Step 2: Select Version

Choose the latest version or specify a version range:

* **Up to Next Major**: Recommended for production
* **Exact Version**: For stability

### Step 3: Create an API key

The SDK requires an API key scoped to the `iap:read` permission. This permission is designed for client-side use, so the key is safe to embed in your app bundle.

#### Open Developer Settings

Go to [Whop Developer Settings](https://whop.com/dashboard/developer) and select your app.

#### Create the API key

Click **Create API Key** and select **only** the `iap:read` permission.

#### Copy the key

Copy the generated key — you'll pass it to `Checkout.shared.configure()` in the next step.

> **Warning**
>
> Only grant the `iap:read` permission. It's the only permission designed for client-side use and limits the key to in-app purchase operations. Never ship a key with broader permissions inside your app.

### Step 4: Import and configure

```swift
import SwiftUI
import WhopCheckout

@main
struct YourApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environment(Checkout.shared)
                .task {
                    try? await Checkout.shared.configure(
                        // companyId: find in Dashboard URL (starts with biz_)
                        companyId: "biz_xxxxxxxxxxxxxx",
                        // apiKey: create in Dashboard > Developer with iap:read permission
                        apiKey: "your_api_key_here",
                        planMappings: [
                            .init(whopId: "plan_xxxxx", appleId: "monthly_sub")
                        ]
                    )
                }
        }
    }
}
```

#### [Build a Paywall](/developer/guides/ios/build-a-paywall)

Continue with the full setup guide

---

## WhopElements (embedded Chat, Payouts...)

Use WhopElements to embed Whop chat channels in your app.

### Step 1: Add Package Dependency

In Xcode, go to **File** → **Add Package Dependencies...**

Enter the package URL:

```
https://github.com/whopio/whopsdk-elements-swift
```

### Step 2: Select Version

Choose the latest version or specify a version range.

### Step 3: Import and Configure the specific element

```swift
import SwiftUI
import WhopElements

@main
struct YourApp: App {
    var body: some Scene {
        WindowGroup {
            NavigationStack {
                WhopChatView(channelId: "chat_feed_XXXXXXXXXXXXXX")
            }
            .task {
                await WhopSDK.configureWithOAuth(appId: "app_XXXXXXXXXXXXXX")
            }
        }
    }
}
```

#### [Embedded Chat](/developer/guides/chat/quickstart)

Continue with the chat integration guide

#### [Embedded Payouts](/developer/platforms/render-payout-portal)

Continue with the chat integration guide

---

## Requirements

* iOS 17.0+
* Xcode 15.0+
* Swift 5.10+

## Next steps

#### [Build a Paywall](/developer/guides/ios/build-a-paywall)

Add subscriptions and payments

#### [Check Entitlements](/developer/guides/ios/check-entitlements)

Gate content based on subscription status

#### [Embedded Chat](/developer/guides/chat/quickstart)

Add Whop chat to your app

#### [Embedded Payouts](/developer/platforms/render-payout-portal)

Enable connected account payouts

#### [API Reference](/developer/guides/ios/checkout-reference)

Full SDK documentation