> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhelium.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Helium is a paywall platform for mobile apps. Paywalls, workflows, triggers, targeting and experiments are configured in the dashboard (https://app.tryhelium.com); the SDK's job is to initialize, present a paywall for a trigger, and report purchases.
> Pick the SDK page for the user's platform: /sdk/quickstart-ios (Swift), /sdk/quickstart-android (Kotlin), /sdk/quickstart-react-native, /sdk/quickstart-flutter. Method names differ per platform; copy them from the page for that platform, never from another platform's page.
> Pages under /sdk/quickstart-ios-v3 and /sdk/quickstart-android-v0 are legacy SDK versions. Use them only when the user is on that version; for upgrades use the /migrations pages.
> For live dashboard data (paywalls, workflows, metrics) connect the Helium MCP server at https://app.tryhelium.com/api/mcp (see /ai-tools/mcp). For SQL over events, revenue, subscriptions and users use the Data Access API (/data-access/overview) and the helium-data-access skill (/data-access/agent-skill). This documentation site also exposes a docs-search MCP server at https://docs.tryhelium.com/mcp.
> Web checkout (App2Web) with Stripe or Paddle is a separate flow from in-app purchases; start at /web-checkout/overview.
> Every page is available as Markdown by appending .md to its URL. The full index is at https://docs.tryhelium.com/llms.txt.

# Promotional Offers

> Show App Store promotional offers to existing or lapsed subscribers by combining entitlement checks, paywall traits and a custom purchase delegate.

> [card] Promotional Offer
>
> An offer on a subscription for users who already have an active subscription in the same subscription group or previously had a subscription in the subscription group.

*This guide is focused on iOS although similar can be achieved with Android.*

Helium does not yet officially support promotional offers. However you can implement this by doing the following:

1. Check entitlements of user to determine eligibility for the promotional offer. You can use the Helium SDK to help with this.
2. Use a paywall trait or targeting to display promotional experience in paywall.
3. Call an endpoint on your server that can [generate JWS signature](https://developer.apple.com/documentation/StoreKit/generating-jws-to-sign-app-store-requests) for promotional offer.
4. Override default Helium purchase logic to pass in the promotional offer:
   ```swift theme={null}
   // Override default StoreKitDelegate (executes purchase through StoreKit2)
   class MyHeliumPurchaseDelegate : StoreKitDelegate {
       
       // Available in iOS Helium SDK 4.4.3+
       override func performPurchase(product: Product, productId: String) async throws -> Product.PurchaseResult {
           // Determine eligibility based on your business logic (e.g. server check, user state).
           let isEligible: Bool = true
           let purchaseOptions: Set<Product.PurchaseOption> = isEligible
               ? Set(Product.PurchaseOption.promotionalOffer("offer-id-here", compactJWS: "compact-jws-from-your-server"))
               : []
           return try await product.heliumPurchase(options: purchaseOptions)
       }
       
   }
   // end delegate
   // Make sure to set purchase delegate before your initialize call
   Helium.config.purchaseDelegate = MyHeliumPurchaseDelegate()
   Helium.shared.initialize()
   ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.