> ## 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 레퍼런스

> WhopCheckout iOS SDK의 클래스, 메서드, 타입에 대한 레퍼런스입니다.

이 페이지는 WhopCheckout SDK에서 사용할 수 있는 모든 클래스, 메서드, 속성, 타입을 설명합니다.

> [!NOTE]
>
> 가이드는 [페이월 만들기](https://docs.whop.com/ko/developer/guides/ios/build-a-paywall.md) 또는
> [이용 권한 확인하기](https://docs.whop.com/ko/developer/guides/ios/check-entitlements.md)를 참고하세요.

## Checkout

인앱 구매를 관리하는 기본 클래스입니다. SwiftUI의 environment 시스템에서 이 `@Observable` 클래스를 사용할 수 있습니다.

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

***

### `shared`

공유 Checkout 인스턴스입니다. 이 싱글톤을 사용해 SDK를 구성하고 구매를 관리하세요.

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

**예제:**

```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를 구성하고 초기화합니다. 앱 시작 시 한 번 호출하세요.

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

**매개변수:**

| 매개변수 | 타입 | 설명 |
| - | - | - |
| `companyId` | `String` | Whop 계정 ID(`biz_`로 시작) |
| `apiKey` | `String` | API 키. `iap:read` 범위만 부여하세요. 앱에 임베드해도 안전한 이유는 [API 키 만들기](https://docs.whop.com/ko/developer/guides/ios/installation.md#step-3-create-an-api-key)를 참고하세요. |
| `planMappings` | `[PlanMapping]` | Whop 변형 ID를 Apple StoreKit 상품 ID에 매핑하는 호환성 속성. StoreKit 대체가 필요 없으면 빈 배열을 전달하세요. |

**예제:**

```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 초기화가 완료되었는지 나타냅니다.

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

**예제:**

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

***

### deviceId

SDK가 관리하는 고유 기기 식별자입니다. iOS Keychain을 사용해 앱을 다시 실행해도 유지됩니다.

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

***

### appUserId

현재 사용자의 ID이며, 게스트인 경우 `nil`입니다.

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

***

### `plans`

구성된 상품에 대해 사용 가능한 구독 변형을 담고 있는 호환성 속성입니다.

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

**예제:**

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

***

### `memberships`

현재 사용자 또는 기기의 활성 멤버십 배열입니다.

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

***

### `isSubscribed`

사용자에게 활성 멤버십이 있는지 여부입니다.

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

**예제:**

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

***

### `supportsExternalPurchases`

현재 App Store 지역이 외부(StoreKit이 아닌) 구매를 지원하는지 여부입니다. 현재 미국 사용자에게는 `true`, 그 외 지역에서는 `false`입니다.

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

`true`이면 SDK는 기본적으로 Whop 웹 체크아웃(더 낮은 수수료)을 사용합니다. `false`이면 기본적으로 StoreKit을 사용합니다.

***

### `refreshPlans()`

서버에서 사용 가능한 변형을 새로 고칩니다.

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

**반환값:** 현재 가격이 반영된 새로 고친 변형.

**발생하는 오류:** 새로 고침이 실패하면 `WhopCheckoutError`.

초기화 후 가격이나 변형 사용 가능 여부를 업데이트하려면 이를 호출하세요. 호환성 속성 `plans`도 최신 데이터로 업데이트됩니다.

**예제:**

```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:)`

사용자가 특정 상품에 접근할 수 있는지 확인합니다.

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

**매개변수:**

| 매개변수 | 타입 | 설명 |
| - | - | - |
| `productId` | `String` | 확인할 상품 ID(`prod_`로 시작) |

**반환값:** 사용자에게 해당 상품의 활성 멤버십이 있으면 `true`

**예제:**

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

***

### purchase(\_:method:)

변형에 대한 구매 흐름을 시작합니다. 기본적으로 미국에서는 Whop 웹 체크아웃(더 낮은 수수료)을, 그 외 지역에서는 StoreKit을 사용합니다.

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

**매개변수:**

| 매개변수 | 타입 | 설명 |
| - | - | - |
| `whopPlanId` | `String` | 구매할 Whop 변형 ID(`plan_` 접두사 유지) |
| `method` | `PaymentMethod?` | 결제 수단을 재정의합니다. 기본값은 지역에 따라 결정됩니다. |

**반환값:** 영수증 ID와 멤버십 정보를 담은 `CheckoutPurchaseResult`

**발생하는 오류:**

* 사용자가 체크아웃을 닫으면 `WhopCheckoutError.cancelled`
* SDK가 구성되지 않았으면 `WhopCheckoutError.notConfigured`
* 결제가 실패하면 `WhopCheckoutError.paymentFailed(String)`

**예제:**

```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에는 [`Checkout.ApplePayButton`](#checkout-applepaybutton)을 사용하거나,
> UI가 사용자 지정 상호작용으로 Apple Pay를 시작하는 경우
> [`presentApplePay(_:)`](#presentapplepay-_)를 사용하세요.

***

### logIn(appUserId:)

사용자를 로그인시키고 기기와 연결된, 아직 귀속되지 않은 멤버십을 귀속시킵니다.

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

**매개변수:**

| 매개변수 | 타입 | 설명 |
| - | - | - |
| `appUserId` | `String` | 앱의 사용자 ID(같은 사용자에 대해 변경되지 않아야 함) |

**예제:**

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

***

### `logOut()`

현재 사용자를 로그아웃시키고 로컬 상태에서 멤버십을 지웁니다.

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

**예제:**

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

***

### `restorePurchases()`

StoreKit과 Whop 모두에서 구매를 복원합니다.

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

**반환값:** SDK가 활성 구독을 찾으면 `true`

**예제:**

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

***

## 타입

### `CheckoutPurchaseResult`

성공한 구매의 결과입니다.

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

| 속성 | 타입 | 설명 |
| - | - | - |
| `receiptId` | `String` | 이 구매의 고유 영수증 ID |
| `membership` | `CheckoutMembership?` | 이 구매로 생성된 멤버십 |

> [accordion] membership은 언제 nil인가요?
>
> `membership` 속성은 사용된 결제 수단에 따라 달라집니다:
>
> | 결제 수단 | 지역 | `membership` 값 |
> | - | - | - |
> | Whop 웹 체크아웃 | 미국 | 즉시 채워짐 |
> | StoreKit | 미국 외 | 처음에는 `nil` |
>
> **StoreKit 구매가 nil을 반환하는 이유:**
> StoreKit 거래는 Apple이 비동기적으로 처리합니다. 구매가 완료될 때 SDK가 아직 Whop 멤버십을 동기화하지 못했을 수 있습니다. SDK는 StoreKit 이용 권한도 추적하므로 `checkout.isSubscribed`는 여전히 `true`를 반환합니다.
>
> **두 경우를 모두 처리하는 방법:**
>
> ```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
> }
> ```
>
> **핵심:** 액세스를 부여할 때 `membership`이 nil이 아니라는 데 의존하지 마세요. 구독 상태를 확인하려면 항상 `checkout.isSubscribed` 또는 `checkout.hasAccess(to:)`를 사용하세요.

***

### `PlanMapping`

SDK 구성 중에 사용되는 Whop 변형과 Apple StoreKit 상품 간의 매핑입니다. 미국 외 지역의 StoreKit 구매에 어떤 Apple 상품을 사용할지 SDK에 알려줍니다.

> [!NOTE]
>
> **PlanMapping과 CheckoutPlan 비교:** `PlanMapping`은 SDK 구성(ID 매핑)용입니다.
> `CheckoutPlan`은 UI에 표시하는 것입니다(가격, 제목 등 포함). `configure()`에서
> `PlanMapping` 객체를 만든 다음, `checkout.plans`를 통해 `CheckoutPlan` 객체에 접근하세요.

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

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

| 속성 | 타입 | 설명 |
| - | - | - |
| `whopId` | `String` | Whop 변형 ID(예: `plan_xxx`) |
| `appleId` | `String` | App Store Connect의 Apple 상품 ID(예: `com.yourapp.monthly`) |

**예제:**

```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 변형과 Apple 상품의 가격 및 청구 주기가 일치해야 합니다.
> 호환성 API 세부 정보는 [`PlanMapping`](#planmapping)을 참고하세요.

***

### `PaymentMethod`

구매에 사용할 결제 수단입니다.

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

| 케이스 | 설명 |
| - | - |
| `whop` | Whop을 통한 웹 체크아웃. 2.7% + \$0.30 수수료(Apple의 15-30% 대비). 미국에서 사용 가능. |
| `storeKit` | App Store를 통한 StoreKit 인앱 구매(15-30% 수수료). 미국 외 지역에서 대체 수단으로 사용됩니다. |

> [!NOTE]
>
> Apple Pay는 `PaymentMethod`에 포함되지 않으며, 별도의 인터페이스가 있습니다:
> [`Checkout.ApplePayButton`](#checkout-applepaybutton) 및
> [`presentApplePay(_:)`](#presentapplepay-_).

***

### `Checkout.ApplePayButton`

Apple의 공식 Apple Pay 버튼을 렌더링하고 전체 구매 흐름을 처리하는 미리 만들어진 SwiftUI 뷰입니다. Apple Pay를 제공할 때는 **이 컴포넌트**(또는 `PKPaymentButton` / `PayWithApplePayButton`)**를 사용해야 합니다**. Apple의 Human Interface Guidelines는 사용자 지정 스타일 버튼을 허용하지 않습니다.

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

**매개변수:**

| 매개변수 | 타입 | 설명 |
| - | - | - |
| `planId` | `String` | 구매할 Whop 변형 ID |
| `label` | `PayWithApplePayButtonLabel` | 버튼 레이블 스타일: `.plain`, `.buy`, `.subscribe`, `.checkout`, `.book`, `.order` 등 |
| `onCompletion` | `(Result) -> Void` | 성공 또는 실패 시 호출됩니다. 사용자가 취소하면 **호출되지 않습니다**. |

**예제:**

```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는 디지털 콘텐츠용이 아닙니다.** 앱이 실물 상품이나 오프라인 서비스를
> 판매하는 경우에만 `Checkout.ApplePayButton`을 사용하세요. 디지털 콘텐츠(프리미엄 기능 구독,
> 인앱 화폐 등)를 판매하는 앱은 StoreKit을 사용해야 합니다. 아래의
> [Apple Pay 사용 자격](#apple-pay-eligibility) 섹션을 참고하세요.

### `presentApplePay(_:)`

미리 만들어진 버튼 대신 사용자 지정 상호작용(예: 밀어서 결제 컨트롤)으로 Apple Pay를 시작하는 UI를 위해 Apple Pay 시트를 직접 표시합니다.

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

사용자 상호작용에 대한 직접적인 응답으로만 호출하세요. Apple은 사용자가 명시적으로 결제를 요청한 경우에만 결제 시트 표시를 허용합니다. 사용자가 시트를 닫으면 `WhopCheckoutError.cancelled`가 발생합니다.

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

`Checkout.ApplePayButton`과 동일한 [Apple Pay 사용 자격](#apple-pay-eligibility) 규칙이 적용됩니다.

***

### `CheckoutPlan` 표시 모델

호환성 속성 `checkout.plans`를 통해 접근하는, 구매 가능한 구독 변형입니다. UI에 변형 정보를 표시하고 구매하는 데 사용하세요.

> [!NOTE]
>
> **호환성 타입:** `CheckoutPlan`에는 UI를 위한 전체 변형 세부 정보(가격, 제목,
> 체험 정보)가 포함됩니다. `Plan`은 SDK 구성 중에 사용되는 ID 매핑입니다. `CheckoutPlan` 객체는
> 직접 만들지 않으며, 구성 후 `checkout.plans`에서 가져옵니다.

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

| 속성 | 타입 | 설명 |
| - | - | - |
| `id` | `String` | 변형 ID |
| `productId` | `String?` | 이 변형이 속한 상품 |
| `title` | `String?` | 변형의 표시 이름 |
| `description` | `String?` | 변형의 설명 텍스트 |
| `planType` | `PlanType` | 일회성 변형인지 반복 변형인지 여부 |
| `billingPeriodDays` | `Int?` | 청구 주기의 일수(30 = 월간, 365 = 연간) |
| `baseCurrency` | `String` | 통화 코드(예: `usd`) |
| `initialPrice` | `Double` | 변형의 초기 가격 |
| `renewalPrice` | `Double` | 갱신 가격 |
| `trialPeriodDays` | `Int?` | 체험 기간의 일수 |
| `renewalPeriod` | `RenewalPeriod?` | 계산된 갱신 주기(`.monthly`, `.yearly` 등) |
| `whopDisplayPrice` | `String` | 형식이 지정된 Whop 가격(예: "\$9.99") |
| `appleDisplayPrice` | `String?` | 변형 매핑이 있는 경우 현지화된 StoreKit 가격 |

***

### `CheckoutMembership`

활성 구독 멤버십입니다.

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

| 속성 | 타입 | 설명 |
| - | - | - |
| `id` | `String` | 멤버십 ID |
| `productId` | `String` | 이 멤버십이 속한 상품 |
| `planId` | `String` | 이 멤버십의 변형 ID를 담은 호환성 필드 |
| `status` | `Status` | 멤버십의 현재 상태 |
| `isActive` | `Bool` | 멤버십이 액세스를 부여하는지 여부(`active`, `trialing`, `canceling`, `pastDue`, `completed`이면 true) |
| `isClaimed` | `Bool` | 사용자가 멤버십을 귀속했는지 여부 |
| `createdAt` | `Date` | Whop이 멤버십을 생성한 시점 |
| `expiresAt` | `Date?` | 멤버십이 만료되는 시점 |
| `renewalPeriodEnd` | `Date?` | 현재 갱신 주기의 종료 시점 |
| `cancelAtPeriodEnd` | `Bool` | 주기 종료 시 멤버십이 취소될지 여부 |
| `receiptId` | `String?` | 이 멤버십의 영수증 ID |

***

### WhopCheckoutError

SDK가 발생시키는 오류입니다.

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

| 케이스 | 설명 |
| - | - |
| `cancelled` | 사용자가 구매를 완료하지 않고 체크아웃 시트를 닫았습니다 |
| `notConfigured` | SDK가 구성되지 않았습니다. 먼저 `Checkout.shared.configure()`를 호출하세요. |
| `paymentFailed(String)` | 결제가 실패했습니다. 연결된 문자열에 오류 메시지가 포함됩니다. |

***

## `Apple Pay` 사용 자격

> [!WARNING]
>
> **대부분의 앱은 Apple Pay를 사용해서는 안 됩니다.** WhopCheckout SDK를 통한 Apple Pay는
> 실물 상품이나 오프라인 서비스를 판매하는 앱 전용이며, 디지털 콘텐츠, 앱 기능 구독,
> 인앱 화폐에는 사용할 수 없습니다.

### `App Store` 심사 지침

Apple의 [App Store 심사 지침 3.1.1](https://developer.apple.com/app-store/review/guidelines/#in-app-purchase)은 **디지털 상품 및 서비스**(프리미엄 기능, 구독, 콘텐츠 잠금 해제, 가상 화폐)에 인앱 구매(StoreKit)를 사용하도록 요구합니다. 이러한 거래에는 Apple Pay 사용이 명시적으로 금지됩니다.

[지침 3.1.3(e)](https://developer.apple.com/app-store/review/guidelines/#multiplatform-services)와 [Apple Pay 지침](https://developer.apple.com/apple-pay/)은 **실물 상품 및 오프라인 서비스** 구매에 Apple Pay를 허용합니다.

### 자격을 갖춘 앱

Apple Pay(`Checkout.ApplePayButton`)를 사용**할 수 있는** 앱:

| 카테고리 | 예시 |
| - | - |
| 전자상거래 | 의류, 전자제품, 실물 굿즈 |
| 음식 및 배달 | 음식 배달, 식료품 주문 |
| 교통 | 차량 호출, 렌터카, 주차 |
| 여행 및 숙박 | 호텔 예약, 항공권, 이벤트 티켓 |
| 전문 서비스 | 과외 수업, 컨설팅, 주택 수리 예약 |
| 피트니스 및 웰니스 | 대면 수업 예약, 개인 트레이닝 세션 |

StoreKit(`.storeKit`) 또는 Whop 웹 체크아웃(`.whop`)을 **반드시** 사용해야 하는 앱:

| 카테고리 | 예시 |
| - | - |
| 디지털 구독 | 프리미엄 앱 기능, 프로 등급 |
| 디지털 콘텐츠 | 전자책, 음악, 동영상 스트리밍 |
| 가상 상품 | 인앱 화폐, 꾸미기 아이템, 파워업 |
| 온라인 강좌 | 동영상 강좌, 디지털 워크숍 |
| SaaS 기능 | 클라우드 저장 공간 업그레이드, API 액세스 등급 |

### 선택 방법

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

앱이 자격을 갖추었다면 `Checkout.ApplePayButton`을 사용하세요. 앱의 자격 여부가 확실하지 않다면 기본적으로 `.whop`(미국) 또는 `.storeKit`(그 외 지역)을 사용하세요. 방법을 지정하지 않고 `purchase()`를 호출하면 SDK가 이를 자동으로 처리합니다.

***

## 요구 사항

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


## Related topics

- [iOS Checkout SDK](https://docs.whop.com/ko/developer/guides/ios/overview.md)
- [Whop iOS SDK 설치하기](https://docs.whop.com/ko/developer/guides/ios/installation.md)
- [Element Sessions 타입 레퍼런스](https://docs.whop.com/ko/sdk/elements/types.md)
