<!--
{
  "availability" : [
    "iOS: 18.2.0 -",
    "iPadOS: 18.2.0 -",
    "macCatalyst: 18.2.0 -",
    "tvOS: 18.2.0 -",
    "visionOS: 2.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/purchase(confirmIn:options:)-3bivf",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV8purchase9confirmIn7optionsAC14PurchaseResultOSo16UIViewControllerC_ShyAC0H6OptionVGtYaKF"
  },
  "title" : "purchase(confirmIn:options:)"
}
-->

# purchase(confirmIn:options:)

Processes a purchase for the product.

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

## Parameters

`viewController`

The view controller 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)