<!--
{
  "availability" : [
    "iOS: 17.4.0 - 26.0.0",
    "iPadOS: 17.4.0 - 26.0.0",
    "macOS: 14.4.0 - 26.0.0",
    "tvOS: 17.4.0 - 26.0.0",
    "visionOS: 1.1.0 - 26.0.0",
    "watchOS: 10.4.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/subscriptionPromotionalOffer(offer:signature:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP010_StoreKit_aB0E28subscriptionPromotionalOffer5offer9signatureQr0dE07ProductV012SubscriptionH0VSgAJ_AJ0L4InfoVtc_AL9SignatureVAJ_AoLtYaKctF"
  },
  "title" : "subscriptionPromotionalOffer(offer:signature:)"
}
-->

# subscriptionPromotionalOffer(offer:signature:)

Selects a promotional offer to apply to a purchase a customer makes from a subscription store view.

```
nonisolated func subscriptionPromotionalOffer(offer: @escaping (Product, Product.SubscriptionInfo) -> Product.SubscriptionOffer?, signature: @escaping (Product, Product.SubscriptionInfo, Product.SubscriptionOffer) async throws -> Product.SubscriptionOffer.Signature) -> some View
```

## Parameters

`offer`

The system calls this function before drawing the given subscription product on
the subscription store view. Return the promotional offer to apply to the
product, if any, to have system-provided UI reflect the discounted terms under
the selected offer.

`signature`

The system calls this function before processing a purchase, with the
product to be purchased provided as a parameter, along with the selected
subscription offer to be applied to the purchase. Return a signature you
generate on your server that validates the selected offer. Errors thrown
from this closure will be surfaced via the [`onInAppPurchaseCompletion(perform:)`](/documentation/SwiftUI/View/onInAppPurchaseCompletion(perform:))
modifier. For information about generating the signature, see
<doc://com.apple.documentation/documentation/StoreKit/generating-a-signature-for-promotional-offers>.

## Discussion

Subscription stores within this view uses the specified subscription offer to configure
the appearance of the subscription plans displayed, when you use a system-provided
<doc://com.apple.documentation/documentation/StoreKit/SubscriptionStoreControlStyle>
to style the in-app subscription store. Standard
<doc://com.apple.documentation/documentation/StoreKit/ProductViewStyle>
instances don’t show introductory or promotional offers in UI. Use the
<doc://com.apple.documentation/documentation/StoreKit/SubscriptionStoreView>
instead to show these offers in the UI.

If the signature passes validation for the offer you select, the system applies the offer to the purchase.
If the signature fails validation for the offer you select, the purchase fails with
<doc://com.apple.documentation/documentation/StoreKit/Product/PurchaseError/invalidOfferSignature>.

Promotional offers you select in this modifier overwrite any offers you specified in ancestor views.

---

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)