Skip to main content
Whop In-App Purchases let you accept payments directly in your iOS app while avoiding Apple’s 15-30% App Store fees. Instead, you pay Whop’s standard processing fees (2.7% + $0.30 for cards). See fee details.

Before You Begin

Make sure you have the following ready before starting:
You’ll need an API Key with the iap:read permission from the Whop Developer Settings.
  1. Go to Whop Developer Settings
  2. Create a new app or select an existing one
  3. Generate an API Key with only the iap:read permission
The iap:read permission is designed for client-side use. It’s safe to include in your iOS app because it only grants access to IAP operations.
Create a product and plan in your Whop Dashboard:
  1. Go to your Whop Dashboard
  2. Navigate to Products and create a product (or use an existing one)
  3. Add at least one Plan with pricing (subscription or one-time)
  4. Note your Product ID (starts with prod_) and Plan ID (starts with plan_)

Quick Start

Once configured, accepting payments is just a few lines of code:
import WhopCheckout

// In your App struct
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")
                    ]
                )
            }
    }
}

// In your views
struct ContentView: View {
    @Environment(Checkout.self) var checkout

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

Get Started

Follow the setup guide to install and configure the SDK

How It Works

1

Create an API key

Generate an API key with only the iap:read permission in your Whop Developer Settings.
2

Initialize the SDK

Pass your company ID, API key, and plan mappings to Checkout.shared.configure().
3

Check membership status

Use isSubscribed or hasAccess(to:) to gate premium content.
4

Present checkout

Call purchase() to display a payment sheet. The SDK automatically uses Whop checkout in the US (lower fees) and StoreKit elsewhere.

Features

FeatureDescription
Lower feesWhop charges 2.7% + $0.30 in the US vs Apple’s 15-30% App Store fees
Smart routingAutomatically uses Whop checkout in the US, StoreKit elsewhere
Apple PayNative Apple Pay support for service-based apps via PassKit
Zero backendNo server required—configure with just an API key
Subscriptions & one-timeSupport for recurring and single payments
Guest purchasesUsers can buy before creating an account
Cross-device syncMemberships sync when users log in
SwiftUI nativeBuilt with @Observable for seamless integration

Guides

Setup

Install and initialize the SDK

Purchasing

Display plans and handle the checkout flow

User Management

Handle login, logout, and membership checking

Requirements

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