<!--
{
  "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/appAccountToken(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV14PurchaseOptionV15appAccountTokenyAE10Foundation4UUIDVFZ"
  },
  "title" : "appAccountToken(_:)"
}
-->

# appAccountToken(_:)

Sets a UUID to associate the purchase with an account in your system.

```
static func appAccountToken(_ token: UUID) -> Product.PurchaseOption
```

## Parameters

`token`

A UUID you provide to associate with the purchase.

## Return Value

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

## Discussion

When you set the app account token in the purchase options, the App Store returns the same app account token value in the resulting transaction, in [`appAccountToken`](/documentation/StoreKit/Transaction/appAccountToken).

---

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)