Skip to main content
The Whop iOS SDK is distributed as separate packages for different features. 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: 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: "biz_xxxxxxxxxxxxxx",
                        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