> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# iOS Checkout SDK

> Verkoop in-app-aankopen en abonnementen in je iOS-app, met Whop-betalingen in de VS en StoreKit overal elders.

Met de Whop iOS Checkout SDK verkoop je in-app-aankopen en abonnementen in je native iOS-app. In de Verenigde Staten gebruikt de SDK automatisch de betalingsverwerking van Whop (2,7% + \$0,30 tegenover 15-30% bij Apple). Elders valt de SDK terug op StoreKit van Apple voor wereldwijde dekking.

Om betalingen persoonlijk aan te nemen, gebruik je in plaats daarvan de Apple Pay-knop van de SDK om [eenmalige betalingen te accepteren](https://docs.whop.com/nl/developer/guides/ios/accept-one-time-payments.md).

> [!TIP]
>
> De SDK wordt geconfigureerd met een afgebakende `iap:read`-API-sleutel die veilig in je app-bundel kan worden meegeleverd. Zie [Een API-sleutel aanmaken](https://docs.whop.com/nl/developer/guides/ios/installation.md#step-3-create-an-api-key) voor de instelling.

> [!NOTE]
>
> Products en Variants zijn de huidige commerce-resources. De iOS-SDK biedt nog steeds compatibiliteitssymbolen zoals `plans`, `CheckoutPlan`, `planMappings` en `planId`. Al die symbolen verwijzen naar varianten.

## Wat je kunt bouwen

> [card] [Een paywall bouwen](https://docs.whop.com/nl/developer/guides/ios/build-a-paywall.md)
>
> Toon abonnementsvarianten en verwerk aankopen in je app

> [card] [Rechten controleren](https://docs.whop.com/nl/developer/guides/ios/check-entitlements.md)
>
> Verifieer de abonnementsstatus en scherm premiumcontent af

## Gerelateerde iOS-SDK's

Whop levert ook aparte SDK's voor ingesloten ervaringen:

> [card] [Ingesloten chat](https://docs.whop.com/nl/developer/guides/chat/quickstart.md)
>
> Voeg Whop-chatkanalen direct toe aan je app

> [card] [Wallet Elements](https://docs.whop.com/nl/elements/latest/getting-started.md)
>
> Toon de saldi en activiteit van een account met de Swift-wallet-elements

## Snel voorbeeld

Hier is een compleet voorbeeld dat de SDK in actie laat zien:

```swift theme={null}
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")
                }
            }
        }
    }
}
```

## Aan de slag

**1. Installeer de SDK**

Voeg het pakket WhopCheckout via Swift Package Manager toe aan je Xcode-project.

[Installatiegids →](https://docs.whop.com/nl/developer/guides/ios/installation.md)

**2. Haal je API-sleutel op**

Maak in je [ontwikkelaarsinstellingen](https://whop.com/dashboard/developer) een API-sleutel aan met de machtiging `iap:read`. [Waarom dit veilig is om in te sluiten →](https://docs.whop.com/nl/developer/guides/ios/installation.md#step-3-create-an-api-key)

**3. Configureer de SDK**

Initialiseer de SDK met je account-ID, API-sleutel en variantkoppelingen via de compatibiliteitseigenschap `planMappings` op `Checkout.shared.configure()`.

**4. Bouw je paywall**

Toon varianten en verwerk aankopen. De SDK gebruikt automatisch de Whop-checkout in de VS en elders StoreKit.

[Een paywall bouwen →](https://docs.whop.com/nl/developer/guides/ios/build-a-paywall.md)

## Referentie

> [card] [API-referentie](https://docs.whop.com/nl/developer/guides/ios/checkout-reference.md)
>
> Volledige API-documentatie voor alle Checkout-klassen, -methoden en -typen

## Vereisten

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


## Related topics

- [Referentie voor de iOS Checkout SDK](https://docs.whop.com/nl/developer/guides/ios/checkout-reference.md)
- [Betalingen accepteren](https://docs.whop.com/nl/developer/guides/accept-payments.md)
- [De Whop iOS-SDK's installeren](https://docs.whop.com/nl/developer/guides/ios/installation.md)
