---
title: "purchase(confirmIn:options:)"
framework: storekit
role: symbol
role_heading: Instance Method
path: "storekit/product/purchase(confirmin:options:)-6dj6y"
---

# purchase(confirmIn:options:)

Initiates a purchase for the product with the App Store and displays the confirmation sheet.

## Declaration

```swift
@MainActor func purchase(confirmIn scene: some UIScene, options: Set<Product.PurchaseOption> = []) async throws -> Product.PurchaseResult
```

## Parameters

- `scene`: The doc://com.apple.documentation/documentation/UIKit/UIScene the system uses to show the purchase confirmation UI.
- `options`: A set of options (doc://com.apple.storekit/documentation/StoreKit/Product/PurchaseOption) you can associate with the purchase.

## Return Value

Return Value The result of the purchase, Product.PurchaseResult.

## Discussion

Discussion StoreKit provides several APIs you can use to enable customers to initiate a purchase. Before using purchase(confirmIn:options:), consider the following APIs and choose the one that best suits your app’s implementation: Use PurchaseAction for apps that use SwiftUI on any platform, including multi-scene apps for visionOS. Use purchase(confirmIn:options:) for apps that use UIKit. Use purchase(confirmIn:options:) for apps that run on macOS and use AppKit. Use purchase(options:) for apps that runs on watchOS. important: If you use StoreKit views such as ProductView, StoreView, or SubscriptionStoreView you don’t need to call any other API to initiate a purchase. StoreKit manages the purchase action automatically, including presenting the purchase confirmation UI. For more information, see StoreKit views. This method may throw a Product.PurchaseError or StoreKitError.

## See Also

### Purchasing a product

- [purchase(options:)](storekit/product/purchase(options:).md)
- [purchase(confirmIn:options:)](storekit/product/purchase(confirmin:options:)-3bivf.md)
- [purchase(confirmIn:options:)](storekit/product/purchase(confirmin:options:)-8eai6.md)
- [Product.PurchaseOption](storekit/product/purchaseoption.md)
- [Product.PurchaseResult](storekit/product/purchaseresult.md)
- [Product.PurchaseError](storekit/product/purchaseerror.md)
