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

# purchase(confirmIn:options:)

Processes a purchase for the product.

## Declaration

```swift
func purchase(confirmIn window: NSWindow, options: Set<Product.PurchaseOption> = []) async throws -> Product.PurchaseResult
```

## Parameters

- `window`: The window to show purchase confirmation UI in proximity to.
- `options`: A set of options to configure the purchase.

## Return Value

Return Value The result of the purchase

## Discussion

Discussion note: A PurchaseError or StoreKitError.

## See Also

### Purchasing a product

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