Skip to navigation

iOS Checkout SDK

The Whop iOS Checkout SDK lets you sell in-app purchases and subscriptions in your native iOS app. It 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.

The SDK is configured with a scoped iap:read API key that’s safe to ship in your app bundle. See Create an API key for setup.

What you can build

Whop also ships separate SDKs for embedded experiences:

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: 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")
]
)
}
}
}
}
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. Why this is safe to embed →

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

Requirements

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