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

# Whop iOS SDK'larını yükleyin

> WhopCheckout ve WhopElements SDK'larını Swift Package Manager ile yükleyin ve WhopCheckout'un ihtiyaç duyduğu API anahtarını oluşturun.

Whop, iOS SDK'larını ayrı Swift paketleri olarak dağıtır: ödemeler için **WhopCheckout**, gömülü sohbet ve ödemeler için **WhopElements**. Yalnızca ihtiyacınız olanı yükleyin.

## WhopCheckout (uygulama içi satın almalar)

WhopCheckout paketi uygulamanızdaki abonelikleri ve ödemeleri yönetir.

### Adım: Paket bağımlılığını ekleyin

Xcode'da **File** → **Add Package Dependencies...** yolunu izleyin.

Paket URL'sini girin:

```
https://github.com/whopio/whopsdk-checkout-swift
```

### Adım: Sürümü seçin

En son sürümü veya bir sürüm aralığını seçin:

* **Up to Next Major**: Üretim için önerilir
* **Exact Version**: Kararlılık için

### Adım: Bir API anahtarı oluşturun

SDK, yalnızca `iap:read` iznine sahip bir API anahtarı gerektirir. Whop bu izni istemci tarafı kullanım için tasarlamıştır; bu nedenle anahtarı uygulama paketinize yerleştirebilirsiniz.

**1. Geliştirici Ayarlarını açın**

[Whop Geliştirici Ayarları](https://whop.com/dashboard/developer) sayfasına gidin ve uygulamanızı seçin.

**2. API anahtarını oluşturun**

**Create API Key** seçeneğini seçin ve ardından **yalnızca** `iap:read` iznini seçin.

**3. Anahtarı kopyalayın**

Oluşturulan anahtarı kopyalayın; bir sonraki adımda bunu `Checkout.shared.configure()` çağrısına ileteceksiniz.

> [!WARNING]
>
> Yalnızca `iap:read` iznini verin. Bu, istemci tarafı kullanım için tasarlanmış tek izindir ve anahtarı uygulama içi satın alma işlemleriyle sınırlar. Uygulamanızın içinde asla daha geniş izinlere sahip bir anahtar göndermeyin.

### Adım: İçe aktarın ve yapılandırın

```swift theme={null}
import SwiftUI
import WhopCheckout

@main
struct YourApp: 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")
                        ]
                    )
                }
        }
    }
}
```

> [card] [Bir ödeme duvarı oluşturun](https://docs.whop.com/tr/developer/guides/ios/build-a-paywall.md)
>
> Eksiksiz kurulum kılavuzuyla devam edin

***

## WhopElements (gömülü sohbet ve cüzdan)

Whop sohbet kanallarını uygulamanıza yerleştirmek için WhopElements'i kullanın.

### Adım: Paket bağımlılığını ekleyin

Xcode'da **File** → **Add Package Dependencies...** yolunu izleyin.

Paket URL'sini girin:

```
https://github.com/whopio/whopsdk-elements-swift
```

### Adım: Sürümü seçin

En son sürümü veya bir sürüm aralığını seçin.

### Adım: İlgili öğeyi içe aktarın ve yapılandırın

```swift theme={null}
import SwiftUI
import WhopElements

@main
struct YourApp: App {
    var body: some Scene {
        WindowGroup {
            NavigationStack {
                WhopChatView(channelId: "chat_feed_XXXXXXXXXXXXXX")
            }
            .task {
                await WhopSDK.configureWithOAuth(appId: "app_XXXXXXXXXXXXXX")
            }
        }
    }
}
```

> [card] [Gömülü sohbet](https://docs.whop.com/tr/developer/guides/chat/quickstart.md)
>
> Sohbet entegrasyonu kılavuzuyla devam edin

> [card] [Cüzdan öğeleri](https://docs.whop.com/tr/elements/latest/getting-started.md)
>
> Swift cüzdan öğeleriyle bir hesabın bakiyelerini ve hareketlerini gösterin

***

## Gereksinimler

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

## Sonraki adımlar

> [card] [Bir ödeme duvarı oluşturun](https://docs.whop.com/tr/developer/guides/ios/build-a-paywall.md)
>
> Abonelik ve ödemeler ekleyin

> [card] [Yetkileri kontrol edin](https://docs.whop.com/tr/developer/guides/ios/check-entitlements.md)
>
> İçeriğe erişimi abonelik durumuna göre kısıtlayın

> [card] [Gömülü sohbet](https://docs.whop.com/tr/developer/guides/chat/quickstart.md)
>
> Uygulamanıza Whop sohbeti ekleyin

> [card] [Cüzdan öğeleri](https://docs.whop.com/tr/elements/latest/getting-started.md)
>
> Swift cüzdan öğeleriyle bir hesabın bakiyelerini ve hareketlerini gösterin

> [card] [API referansı](https://docs.whop.com/tr/developer/guides/ios/checkout-reference.md)
>
> Eksiksiz SDK belgeleri


## Related topics

- [iOS Checkout SDK](https://docs.whop.com/tr/developer/guides/ios/overview.md)
- [iOS Checkout SDK referansı](https://docs.whop.com/tr/developer/guides/ios/checkout-reference.md)
- [Bir iOS ödeme duvarı oluşturun](https://docs.whop.com/tr/developer/guides/ios/build-a-paywall.md)
