<!--
{
  "availability" : [
    "macOS: 15.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/purchase(confirmIn:options:)-8eai6",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV8purchase9confirmIn7optionsAC14PurchaseResultOSo8NSWindowC_ShyAC0H6OptionVGtYaKF"
  },
  "title" : "purchase(confirmIn:options:)"
}
-->

# purchase(confirmIn:options:)

Processes a purchase for the product.

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

The result of the purchase

## Discussion> Throws: A `PurchaseError` or `StoreKitError`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)