Skip to main content
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 FileAdd 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.
1

Open Developer Settings

Go to Whop Developer Settings and select your app.
2

Create the API key

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

Copy the key

Copy the generated key — you’ll pass it to Checkout.shared.configure() in the next step.
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

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

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 FileAdd 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

import SwiftUI
import WhopElements

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

Embedded Chat

Continue with the chat integration guide

Embedded Payouts

Continue with the chat integration guide

Requirements

  • iOS 17.0+
  • Xcode 15.0+
  • Swift 5.10+

Next steps

Build a Paywall

Add subscriptions and payments

Check Entitlements

Gate content based on subscription status

Embedded Chat

Add Whop chat to your app

Embedded Payouts

Enable connected account payouts

API Reference

Full SDK documentation