<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/PurchaseOption/promotionalOffer(id:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV14PurchaseOptionV0aB4TestE16promotionalOffer2idAESS_tFZ"
  },
  "title" : "promotionalOffer(id:)"
}
-->

# promotionalOffer(id:)

Sets a promotional offer for the transaction in the testing environment.

```
static func promotionalOffer(id identifier: String) -> Product.PurchaseOption
```

## Parameters

`identifier`

The identifier of the promotional offer to apply to the transaction. You need to set up identifiers in your StoreKit configuration file.

## Discussion

Use this purchase option when you test your app in Xcode using <doc://com.apple.documentation/documentation/StoreKitTest> and call <doc://com.apple.documentation/documentation/StoreKitTest/SKTestSession/buyProduct(identifier:options:)>. This method makes it possible to test promotional offers without supplying a signature.

Set up the promotional offer identifiers that you use in this call in your StoreKit configuration file. For more information, see <doc://com.apple.documentation/documentation/Xcode/setting-up-storekit-testing-in-xcode>.

When you apply this option, the purchase transaction simulates a customer redeeming a promotional offer, and includes the promotional offer you specify.

---

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)