---
title: "custom(key:value:)"
framework: storekit
role: symbol
role_heading: Type Method
path: "storekit/product/purchaseoption/custom(key:value:)-3g3nc"
---

# custom(key:value:)

Adds a string for a custom key to a purchase.

## Declaration

```swift
static func custom(key: String, value: String) -> Product.PurchaseOption
```

## Parameters

- `key`: The key for this custom option.
- `value`: The string value you assign to this custom option.

## Discussion

Discussion This custom purchase option doesn’t have any effect.

## See Also

### Setting custom purchase options

- [custom(key:value:)](storekit/product/purchaseoption/custom(key:value:)-80cvh.md)
- [custom(key:value:)](storekit/product/purchaseoption/custom(key:value:)-8tjim.md)
- [custom(key:value:)](storekit/product/purchaseoption/custom(key:value:)-7rju9.md)
