> ## 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 referansı

> WhopCheckout iOS SDK'sındaki sınıflar, yöntemler ve türler için referans.

Bu sayfa, WhopCheckout SDK'sında bulunan tüm sınıfları, yöntemleri, özellikleri ve türleri belgeler.

> [!NOTE]
>
> Kılavuzlar için [Bir ödeme duvarı
> oluşturun](https://docs.whop.com/tr/developer/guides/ios/build-a-paywall.md) veya [Yetkileri kontrol
> edin](https://docs.whop.com/tr/developer/guides/ios/check-entitlements.md) sayfalarına bakın.

## Checkout

Uygulama içi satın almaları yönetmek için ana sınıf. SwiftUI'ın ortam sistemi bu `@Observable` sınıfı kullanabilir.

```swift theme={null}
@MainActor @Observable
public class Checkout
```

***

### `shared`

Paylaşılan Checkout örneği. SDK'yı yapılandırmak ve satın almaları yönetmek için bu tekil örneği kullanın.

```swift theme={null}
static let shared: Checkout
```

**Örnek:**

```swift theme={null}
import WhopCheckout

// Configure at app startup
try await Checkout.shared.configure(...)

// Pass through SwiftUI environment
ContentView()
    .environment(Checkout.shared)

// Access in views
@Environment(Checkout.self) var checkout
```

***

### configure(companyId:apiKey:planMappings:)

SDK'yı yapılandırır ve başlatır. Bunu uygulama başlangıcında bir kez çağırın.

```swift theme={null}
func configure(
    companyId: String,
    apiKey: String,
    planMappings: [PlanMapping] = []
) async throws
```

**Parametreler:**

| Parametre | Tür | Açıklama |
| - | - | - |
| `companyId` | `String` | Whop hesap kimliğiniz (`biz_` ile başlar) |
| `apiKey` | `String` | API anahtarınız. Yalnızca `iap:read` kapsamını verin; bunu uygulamanıza yerleştirmenin neden güvenli olduğunu öğrenmek için [Bir API anahtarı oluşturun](https://docs.whop.com/tr/developer/guides/ios/installation.md#step-3-create-an-api-key) bölümüne bakın. |
| `planMappings` | `[PlanMapping]` | Whop varyant kimliklerini Apple StoreKit ürün kimlikleriyle eşleyen uyumluluk özelliği. StoreKit'e geri dönüşe ihtiyacınız yoksa boş bir dizi iletin. |

**Örnek:**

```swift theme={null}
try await Checkout.shared.configure(
    companyId: "biz_xxxxxxxxxxxxxx",
    apiKey: "your_api_key_here",
    planMappings: [
        .init(whopId: "plan_xxxxx", appleId: "monthly_sub"),
        .init(whopId: "plan_yyyyy", appleId: "yearly_sub")
    ]
)
```

***

### isInitialized

SDK'nın başlatmayı tamamlayıp tamamlamadığını belirtir.

```swift theme={null}
var isInitialized: Bool { get }
```

**Örnek:**

```swift theme={null}
if checkout.isInitialized {
    // SDK ready to use
}
```

***

### deviceId

SDK tarafından yönetilen benzersiz cihaz tanımlayıcısı. iOS Anahtar Zinciri kullanılarak uygulama açılışları arasında kalıcı olur.

```swift theme={null}
var deviceId: String { get }
```

***

### appUserId

Geçerli kullanıcının kimliği veya misafir için `nil`.

```swift theme={null}
var appUserId: String? { get }
```

***

### `plans`

Yapılandırılmış ürünler için mevcut abonelik varyantlarını içeren uyumluluk özelliği.

```swift theme={null}
var plans: [CheckoutPlan] { get }
```

**Örnek:**

```swift theme={null}
ForEach(checkout.plans) { plan in
    Text(plan.title ?? "Variant")
}
```

***

### `memberships`

Geçerli kullanıcı veya cihaz için aktif üyeliklerin dizisi.

```swift theme={null}
var memberships: [CheckoutMembership] { get }
```

***

### `isSubscribed`

Kullanıcının herhangi bir aktif üyeliği olup olmadığı.

```swift theme={null}
var isSubscribed: Bool { get }
```

**Örnek:**

```swift theme={null}
if checkout.isSubscribed {
    // Show premium content
}
```

***

### `supportsExternalPurchases`

Geçerli App Store bölgesinin harici (StoreKit dışı) satın almaları destekleyip desteklemediği. Şu anda Amerika Birleşik Devletleri'ndeki kullanıcılar için `true`, diğer yerlerde `false` değerindedir.

```swift theme={null}
var supportsExternalPurchases: Bool { get }
```

`true` olduğunda SDK varsayılan olarak Whop web ödeme sayfasını (daha düşük ücretler) kullanır. `false` olduğunda varsayılan olarak StoreKit'i kullanır.

***

### `refreshPlans()`

Mevcut varyantları sunucudan yeniler.

```swift theme={null}
@discardableResult
func refreshPlans() async throws -> [CheckoutPlan]
```

**Döndürür:** Güncel fiyatlarla yenilenmiş varyantlar.

**Fırlatır:** Yenileme başarısız olursa `WhopCheckoutError`.

Başlatmadan sonra fiyatları veya varyant kullanılabilirliğini güncellemek için bunu çağırın. Bu, uyumluluk özelliği `plans` değerini de en son verilerle günceller.

**Örnek:**

```swift theme={null}
// Refresh and use the return value
let plans = try await Checkout.shared.refreshPlans()

// Or just refresh (plans property updates automatically)
try await Checkout.shared.refreshPlans()
```

***

### `hasAccess(to:)`

Kullanıcının belirli bir ürüne erişimi olup olmadığını kontrol eder.

```swift theme={null}
func hasAccess(to productId: String) -> Bool
```

**Parametreler:**

| Parametre | Tür | Açıklama |
| - | - | - |
| `productId` | `String` | Kontrol edilecek ürün kimliği (`prod_` ile başlar) |

**Döndürür:** Kullanıcının ürün için aktif bir üyeliği varsa `true`

**Örnek:**

```swift theme={null}
// Replace with your product ID from the Whop dashboard
if checkout.hasAccess(to: "prod_xxxxxxxxxxxxxx") {
    // Show pro features
}
```

***

### purchase(\_:method:)

Bir varyant için satın alma akışını başlatır. Varsayılan olarak Amerika Birleşik Devletleri'nde Whop web ödeme sayfasını (daha düşük ücretler), diğer yerlerde StoreKit'i kullanır.

```swift theme={null}
func purchase(_ whopPlanId: String, method: PaymentMethod? = nil) async throws -> CheckoutPurchaseResult
```

**Parametreler:**

| Parametre | Tür | Açıklama |
| - | - | - |
| `whopPlanId` | `String` | Satın alınacak Whop varyant kimliği (`plan_` önekini korur) |
| `method` | `PaymentMethod?` | Ödeme yöntemini geçersiz kılar. Varsayılan değer bölgeye göre belirlenir. |

**Döndürür:** Makbuz kimliğini ve üyelik bilgilerini içeren `CheckoutPurchaseResult`

**Fırlatır:**

* Kullanıcı ödeme sayfasını kapatırsa `WhopCheckoutError.cancelled`
* SDK yapılandırılmamışsa `WhopCheckoutError.notConfigured`
* Ödeme başarısız olursa `WhopCheckoutError.paymentFailed(String)`

**Örnek:**

```swift theme={null}
do {
    // Use default payment method (Whop in US, StoreKit elsewhere)
    let result = try await checkout.purchase("plan_xxxxxxxxxxxxxx")
    print("Success! Receipt: \(result.receiptId)")
} catch WhopCheckoutError.cancelled {
    // User cancelled
} catch {
    // Handle error
}

// Or explicitly choose a payment method
let result = try await checkout.purchase("plan_xxx", method: .storeKit)
```

> [!NOTE]
>
> Apple Pay için [`Checkout.ApplePayButton`](#checkout-applepaybutton) kullanın veya
> arayüzünüz Apple Pay'i özel bir etkileşimden tetikliyorsa
> [`presentApplePay(_:)`](#presentapplepay-_) kullanın.

***

### logIn(appUserId:)

Bir kullanıcının oturumunu açar ve cihazla ilişkili sahiplenilmemiş üyelikleri sahiplenir.

```swift theme={null}
func logIn(appUserId: String) async throws
```

**Parametreler:**

| Parametre | Tür | Açıklama |
| - | - | - |
| `appUserId` | `String` | Uygulamanızın kullanıcı kimliği (aynı kullanıcı için değişmemelidir) |

**Örnek:**

```swift theme={null}
try await checkout.logIn(appUserId: "user_123")
```

***

### `logOut()`

Geçerli kullanıcının oturumunu kapatır ve üyeliklerini yerel durumdan temizler.

```swift theme={null}
func logOut()
```

**Örnek:**

```swift theme={null}
checkout.logOut()
```

***

### `restorePurchases()`

Satın almaları hem StoreKit'ten hem de Whop'tan geri yükler.

```swift theme={null}
func restorePurchases() async throws -> Bool
```

**Döndürür:** SDK aktif bir abonelik bulduysa `true`

**Örnek:**

```swift theme={null}
Button("Restore Purchases") {
    Task {
        let restored = try await checkout.restorePurchases()
        if restored {
            print("Purchases restored!")
        }
    }
}
```

***

## Türler

### `CheckoutPurchaseResult`

Başarılı bir satın almanın sonucu.

```swift theme={null}
struct CheckoutPurchaseResult {
    let receiptId: String
    let membership: CheckoutMembership?
}
```

| Özellik | Tür | Açıklama |
| - | - | - |
| `receiptId` | `String` | Bu satın alma için benzersiz makbuz kimliği |
| `membership` | `CheckoutMembership?` | Bu satın alma tarafından oluşturulan üyelik |

> [accordion] Üyelik ne zaman nil olur?
>
> `membership` özelliği kullanılan ödeme yöntemine bağlıdır:
>
> | Ödeme yöntemi | Bölge | `membership` değeri |
> | - | - | - |
> | Whop web ödeme sayfası | ABD | Hemen doldurulur |
> | StoreKit | ABD dışı | Başlangıçta `nil` |
>
> **StoreKit satın almaları neden nil döndürür:**
> StoreKit işlemleri Apple tarafından eşzamansız olarak işlenir. Satın alma tamamlandığında SDK, Whop üyeliğini henüz senkronize etmemiş olabilir. SDK StoreKit yetkilerini de takip eder, bu nedenle `checkout.isSubscribed` yine de `true` döndürür.
>
> **Her iki durum nasıl yönetilir:**
>
> ```swift theme={null}
> do {
>     let result = try await checkout.purchase("plan_xxx")
>
>     // Always check isSubscribed - works for both payment methods
>     if checkout.isSubscribed {
>         // Grant access
>     }
>
>     // Optionally use membership details if available
>     if let membership = result.membership {
>         print("Membership ID: \(membership.id)")
>         print("Expires: \(membership.expiresAt?.formatted() ?? "N/A")")
>     }
> } catch WhopCheckoutError.cancelled {
>     // User cancelled
> }
> ```
>
> **Önemli nokta:** Erişim vermek için `membership` değerinin nil olmamasına güvenmeyin. Abonelik durumunu kontrol etmek için her zaman `checkout.isSubscribed` veya `checkout.hasAccess(to:)` kullanın.

***

### `PlanMapping`

SDK yapılandırması sırasında kullanılan, bir Whop varyantı ile bir Apple StoreKit ürünü arasındaki eşleme. Bu, SDK'ya Amerika Birleşik Devletleri dışındaki StoreKit satın almaları için hangi Apple ürününü kullanacağını söyler.

> [!NOTE]
>
> **PlanMapping ve CheckoutPlan karşılaştırması:** `PlanMapping` SDK yapılandırması
> içindir (kimlik eşleme). `CheckoutPlan` ise arayüzünüzde gösterdiğiniz şeydir (fiyat,
> başlık vb. içerir). `PlanMapping` nesnelerini `configure()` içinde oluşturursunuz, ardından
> `CheckoutPlan` nesnelerine `checkout.plans` aracılığıyla erişirsiniz.

```swift theme={null}
struct PlanMapping: Sendable {
    let whopId: String
    let appleId: String

    init(whopId: String, appleId: String)
}
```

| Özellik | Tür | Açıklama |
| - | - | - |
| `whopId` | `String` | Whop varyant kimliği (ör. `plan_xxx`) |
| `appleId` | `String` | App Store Connect'teki Apple ürün kimliği (ör. `com.yourapp.monthly`) |

**Örnek:**

```swift theme={null}
// Used in configure() - just maps IDs
try await Checkout.shared.configure(
    companyId: "biz_xxx",
    apiKey: "your_key",
    planMappings: [
        .init(whopId: "plan_monthly", appleId: "com.app.monthly"),
        .init(whopId: "plan_yearly", appleId: "com.app.yearly")
    ]
)

// After configuration, use the compatibility checkout.plans property for UI
ForEach(checkout.plans) { plan in  // These are CheckoutPlan objects
    Text(plan.title ?? "Variant")
    Text(plan.whopDisplayPrice)
}
```

> [!TIP]
>
> Whop varyantlarınız ve Apple ürünleriniz eşleşen fiyatlara ve faturalandırma
> dönemlerine sahip olmalıdır. Uyumluluk API'si ayrıntıları için [`PlanMapping`](#planmapping) bölümüne bakın.

***

### `PaymentMethod`

Bir satın alma için kullanılacak ödeme yöntemi.

```swift theme={null}
enum PaymentMethod: Sendable {
    case whop      // Web checkout via Whop (lower fees)
    case storeKit  // StoreKit in-app purchase via the App Store
}
```

| Durum | Açıklama |
| - | - |
| `whop` | Whop üzerinden web ödeme sayfası. %2,7 + 0,30 \$ ücret (Apple'ın %15-30'una karşılık). Amerika Birleşik Devletleri'nde kullanılabilir. |
| `storeKit` | App Store üzerinden StoreKit uygulama içi satın alma (%15-30 ücret). Amerika Birleşik Devletleri dışında yedek olarak kullanılır. |

> [!NOTE]
>
> Apple Pay `PaymentMethod` içinde yer almaz; kendi arayüzleri vardır:
> [`Checkout.ApplePayButton`](#checkout-applepaybutton) ve
> [`presentApplePay(_:)`](#presentapplepay-_).

***

### `Checkout.ApplePayButton`

Apple'ın resmi Apple Pay düğmesini oluşturan ve tüm satın alma akışını yöneten, önceden oluşturulmuş bir SwiftUI görünümü. Apple Pay sunarken **bu bileşeni** (veya `PKPaymentButton` / `PayWithApplePayButton`) **kullanmanız gerekir**; özel stilli düğmelere Apple'ın Human Interface Guidelines yönergeleri izin vermez.

```swift theme={null}
struct ApplePayButton: View {
    init(
        planId: String,
        label: PayWithApplePayButtonLabel = .plain,
        onCompletion: @escaping (Result<CheckoutPurchaseResult, Error>) -> Void
    )
}
```

**Parametreler:**

| Parametre | Tür | Açıklama |
| - | - | - |
| `planId` | `String` | Satın alınacak Whop varyant kimliği |
| `label` | `PayWithApplePayButtonLabel` | Düğme etiketi stili: `.plain`, `.buy`, `.subscribe`, `.checkout`, `.book`, `.order` vb. |
| `onCompletion` | `(Result) -> Void` | Başarı veya hata durumunda çağrılır. Kullanıcı iptal ettiğinde **çağrılmaz**. |

**Örnek:**

```swift theme={null}
Checkout.ApplePayButton(planId: "plan_xxx", label: .subscribe) { result in
    switch result {
    case .success(let purchase):
        print("Receipt: \(purchase.receiptId)")
    case .failure(let error):
        showError(error.localizedDescription)
    }
}
.frame(height: 48)
```

> [!WARNING]
>
> **Apple Pay dijital içerik için değildir.** `Checkout.ApplePayButton` öğesini yalnızca
> uygulamanız fiziksel ürünler veya gerçek dünya hizmetleri satıyorsa kullanın. Dijital
> içerik (premium özelliklere abonelikler, uygulama içi para birimi vb.) satan uygulamalar
> StoreKit kullanmalıdır. Aşağıdaki [Apple Pay uygunluğu](#apple-pay-eligibility)
> bölümüne bakın.

### `presentApplePay(_:)`

Apple Pay'i önceden oluşturulmuş düğme yerine özel bir etkileşimden (örneğin kaydırarak ödeme kontrolü) başlatan arayüzler için Apple Pay sayfasını doğrudan sunar.

```swift theme={null}
func presentApplePay(_ planId: String) async throws -> CheckoutPurchaseResult
```

Bunu yalnızca bir kullanıcı etkileşimine doğrudan yanıt olarak çağırın; Apple, bir ödeme sayfasının yalnızca kullanıcı açıkça ödeme yapmak istediğinde sunulmasına izin verir. Kullanıcı sayfayı kapattığında `WhopCheckoutError.cancelled` fırlatır.

```swift theme={null}
let result = try await checkout.presentApplePay("plan_xxx")
```

`Checkout.ApplePayButton` için geçerli olan [Apple Pay uygunluğu](#apple-pay-eligibility) kuralları burada da geçerlidir.

***

### `CheckoutPlan` görüntüleme modeli

Uyumluluk özelliği `checkout.plans` aracılığıyla erişilen, satın alınabilir bir abonelik varyantı. Bunu arayüzünüzde varyant bilgilerini göstermek ve satın alma yapmak için kullanın.

> [!NOTE]
>
> **Uyumluluk türleri:** `CheckoutPlan`, arayüzünüz için eksiksiz varyant ayrıntılarını (fiyat,
> başlıklar, deneme bilgisi) içerir. `Plan`, SDK yapılandırması sırasında kullanılan bir kimlik
> eşlemesidir. `CheckoutPlan` nesnelerini asla siz oluşturmazsınız; bunlar yapılandırmadan sonra
> `checkout.plans` üzerinden gelir.

```swift theme={null}
struct CheckoutPlan: Identifiable {
    let id: String
    let productId: String?
    let title: String?
    let description: String?
    let planType: PlanType
    let billingPeriodDays: Int?
    let baseCurrency: String
    let initialPrice: Double
    let renewalPrice: Double
    let trialPeriodDays: Int?

    var renewalPeriod: RenewalPeriod? { get }
    var whopDisplayPrice: String { get }
    var appleDisplayPrice: String? { get }
}

enum PlanType: String {
    case oneTime = "one_time"
    case renewal
    case unknown
}

enum RenewalPeriod: Equatable {
    case weekly      // 7 days
    case monthly     // 30 days
    case quarterly   // 90 days
    case semiAnnual  // 180 days
    case yearly      // 365 days
    case custom(Int) // Custom period in days
}
```

| Özellik | Tür | Açıklama |
| - | - | - |
| `id` | `String` | Varyant kimliği |
| `productId` | `String?` | Bu varyantın ait olduğu ürün |
| `title` | `String?` | Varyantın görünen adı |
| `description` | `String?` | Varyantın açıklama metni |
| `planType` | `PlanType` | Bunun tek seferlik mi yoksa yinelenen bir varyant mı olduğu |
| `billingPeriodDays` | `Int?` | Faturalandırma döngüsündeki gün sayısı (30 = aylık, 365 = yıllık) |
| `baseCurrency` | `String` | Para birimi kodu (ör. `usd`) |
| `initialPrice` | `Double` | Varyantın ilk fiyatı |
| `renewalPrice` | `Double` | Yenilemeler için fiyat |
| `trialPeriodDays` | `Int?` | Deneme süresindeki gün sayısı |
| `renewalPeriod` | `RenewalPeriod?` | Hesaplanan yenileme dönemi (`.monthly`, `.yearly` vb.) |
| `whopDisplayPrice` | `String` | Biçimlendirilmiş Whop fiyatı (ör. "\$9.99") |
| `appleDisplayPrice` | `String?` | Bir varyant eşlemesi varsa yerelleştirilmiş StoreKit fiyatı |

***

### `CheckoutMembership`

Aktif bir abonelik üyeliği.

```swift theme={null}
struct CheckoutMembership: Identifiable {
    let id: String
    let productId: String
    let planId: String
    let status: Status
    let isClaimed: Bool
    let createdAt: Date
    let expiresAt: Date?
    let renewalPeriodEnd: Date?
    let cancelAtPeriodEnd: Bool
    let receiptId: String?

    var isActive: Bool { get }
}

enum Status: String {
    case active
    case canceled
    case canceling
    case completed
    case drafted
    case expired
    case pastDue = "past_due"
    case trialing
    case unresolved
    case unknown
}
```

| Özellik | Tür | Açıklama |
| - | - | - |
| `id` | `String` | Üyelik kimliği |
| `productId` | `String` | Bu üyeliğin ait olduğu ürün |
| `planId` | `String` | Bu üyeliğin varyant kimliğini içeren uyumluluk alanı |
| `status` | `Status` | Üyeliğin mevcut durumu |
| `isActive` | `Bool` | Üyeliğin erişim verip vermediği (`active`, `trialing`, `canceling`, `pastDue`, `completed` için true) |
| `isClaimed` | `Bool` | Bir kullanıcının üyeliği sahiplenip sahiplenmediği |
| `createdAt` | `Date` | Whop'un üyeliği oluşturduğu zaman |
| `expiresAt` | `Date?` | Üyeliğin sona erdiği zaman |
| `renewalPeriodEnd` | `Date?` | Geçerli yenileme döneminin sonu |
| `cancelAtPeriodEnd` | `Bool` | Üyeliğin dönem sonunda iptal edilip edilmeyeceği |
| `receiptId` | `String?` | Bu üyeliğin makbuz kimliği |

***

### WhopCheckoutError

SDK tarafından fırlatılan hatalar.

```swift theme={null}
enum WhopCheckoutError: Error {
    case cancelled
    case notConfigured
    case paymentFailed(String)
}
```

| Durum | Açıklama |
| - | - |
| `cancelled` | Kullanıcı satın almayı tamamlamadan ödeme sayfasını kapattı |
| `notConfigured` | SDK yapılandırılmamış. Önce `Checkout.shared.configure()` çağrısını yapın. |
| `paymentFailed(String)` | Ödeme başarısız oldu. İlişkili dize hata mesajını içerir. |

***

## `Apple Pay` uygunluğu

> [!WARNING]
>
> **Çoğu uygulama Apple Pay kullanmamalıdır.** WhopCheckout SDK aracılığıyla Apple Pay
> yalnızca fiziksel ürünler veya gerçek dünya hizmetleri satan uygulamalar içindir; dijital
> içerik, uygulama özelliklerine abonelikler veya uygulama içi para birimi için değildir.

### `App Store` inceleme yönergeleri

Apple'ın [App Store Review Guideline 3.1.1](https://developer.apple.com/app-store/review/guidelines/#in-app-purchase) yönergesi, **dijital ürün ve hizmetlerin** (premium özellikler, abonelikler, içerik kilidi açma, sanal para birimi) In-App Purchase (StoreKit) kullanmasını zorunlu kılar. Bu işlemler için Apple Pay açıkça yasaktır.

[Guideline 3.1.3(e)](https://developer.apple.com/app-store/review/guidelines/#multiplatform-services) ve [Apple Pay yönergeleri](https://developer.apple.com/apple-pay/), **fiziksel ürünlerin ve gerçek dünya hizmetlerinin** satın alınması için Apple Pay'e izin verir.

### Uygun uygulamalar

Apple Pay (`Checkout.ApplePayButton`) **kullanabilen** uygulamalar:

| Kategori | Örnekler |
| - | - |
| E-ticaret | Giyim, elektronik, fiziksel ürünler |
| Yiyecek ve teslimat | Yemek teslimatı, market siparişleri |
| Ulaşım | Araç çağırma, araç kiralama, otopark |
| Seyahat ve konaklama | Otel rezervasyonları, uçak biletleri, etkinlik biletleri |
| Profesyonel hizmetler | Özel ders seansları, danışmanlık, ev onarımı rezervasyonları |
| Fitness ve sağlıklı yaşam | Yüz yüze ders rezervasyonları, kişisel antrenman seansları |

StoreKit (`.storeKit`) veya Whop web ödeme sayfası (`.whop`) **kullanması gereken** uygulamalar:

| Kategori | Örnekler |
| - | - |
| Dijital abonelikler | Premium uygulama özellikleri, pro katmanlar |
| Dijital içerik | E-kitaplar, müzik, video akışı |
| Sanal ürünler | Uygulama içi para birimi, kozmetik öğeler, güçlendirmeler |
| Çevrimiçi kurslar | Video kurslar, dijital atölyeler |
| SaaS özellikleri | Bulut depolama yükseltmeleri, API erişim katmanları |

### Nasıl seçilir

```
Is the user paying for a physical good or real-world service?
├── YES → You can use Checkout.ApplePayButton (or .whop / .storeKit)
└── NO  → You must use .whop or .storeKit (not Apple Pay)
```

Uygulamanız uygunsa `Checkout.ApplePayButton` kullanın. Uygulamanızın uygun olup olmadığından emin değilseniz varsayılan olarak `.whop` (Amerika Birleşik Devletleri) veya `.storeKit` (diğer yerler) kullanın. Bir yöntem belirtmeden `purchase()` çağırdığınızda SDK bunu otomatik olarak yönetir.

***

## Gereksinimler

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


## Related topics

- [iOS Checkout SDK](https://docs.whop.com/tr/developer/guides/ios/overview.md)
- [Whop iOS SDK'larını yükleyin](https://docs.whop.com/tr/developer/guides/ios/installation.md)
- [Bir iOS ödeme duvarı oluşturun](https://docs.whop.com/tr/developer/guides/ios/build-a-paywall.md)
