<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/PurchaseOption/quantity(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV14PurchaseOptionV8quantityyAESiFZ"
  },
  "title" : "quantity(_:)"
}
-->

# quantity(_:)

Indicates the quantity of items the customer is purchasing.

```
static func quantity(_ quantity: Int) -> Product.PurchaseOption
```

## Parameters

`quantity`

The number of items the customer is purchasing.

    The default value is 1. The maximum value is 10.

## Return Value

An instance of [`Product.PurchaseOption`](/documentation/StoreKit/Product/PurchaseOption) to use in [`purchase(options:)`](/documentation/StoreKit/Product/purchase(options:)).

## Discussion

The quantity applies to consumable Apple In-App Purchases and non-renewing subscriptions.

---

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)