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

# iOS Checkout SDK

> Sell in-app purchases and subscriptions natively on iOS (2.7% + $0.30 vs Apple's 15-30%)

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.

> **Tip**
>
> 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](/developer/guides/ios/installation#step-3-create-an-api-key) for setup.

## What you can build

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

Display subscription plans and handle purchases in your app

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

Verify subscription status and gate premium content

## Related iOS SDKs

Whop also ships separate SDKs for embedded experiences:

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

Add Whop chat channels directly in your app

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

Render the connected-account payout portal

## Quick example

Here's a complete example showing the SDK in action:

```swift
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

#### Install the SDK

Add the WhopCheckout package to your Xcode project via Swift Package Manager.

[Installation guide →](/developer/guides/ios/installation)

#### Get your API key

Create an API key with the `iap:read` permission in your [Developer Settings](https://whop.com/dashboard/developer). [Why this is safe to embed →](/developer/guides/ios/installation#step-3-create-an-api-key)

#### Configure the SDK

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

#### Build your paywall

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

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

## Reference

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

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

## Requirements

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