Skip to main content
The Whop iOS SDK lets you integrate in-app purchases, subscription management, and chat directly into your iOS app. The SDK automatically uses Whop’s payment processing in the US (2.7% + $0.30 vs Apple’s 15-30%) and falls back to Apple’s StoreKit elsewhere for global coverage.

What you can build

Quick example

Here’s a complete example showing the SDK in action:
import SwiftUI
import WhopCheckout

@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environment(Checkout.shared)
                .task {
                    try? await Checkout.shared.configure(
                        companyId: "biz_xxxxxxxxxxxxxx",
                        apiKey: "your_api_key_here",
                        plans: [
                            .init(whopId: "plan_xxxxx", appleId: "monthly_sub")
                        ]
                    )
                }
        }
    }
}

struct ContentView: View {
    @Environment(Checkout.self) var checkout

    var body: some View {
        if checkout.isSubscribed {
            Text("Welcome, premium user!")
        } else {
            Button("Upgrade to Premium") {
                Task {
                    try? await checkout.purchase("plan_xxxxx")
                }
            }
        }
    }
}

Getting started

1

Install the SDK

Add the WhopCheckout package to your Xcode project via Swift Package Manager.Installation guide →
2

Get your API key

Create an API key with the iap:read permission in your Developer Settings.
3

Configure the SDK

Initialize the SDK with your company ID, API key, and plan mappings via Checkout.shared.configure().
4

Build your paywall

Display plans and handle purchases. The SDK automatically uses Whop checkout in the US and StoreKit elsewhere.Build a paywall →

Reference

API Reference

Complete API documentation for all Checkout classes, methods, and types

Requirements

  • iOS 17.0+
  • Xcode 16.0+
  • Swift 5.10+