Repository navigation
Description
Use case
StoreKit 2 lets a server decide, per purchase, whether an introductory offer applies, via Product.PurchaseOption.introductoryOfferEligibility(compactJWS:).
The app receives a compact JWS that its own server signs with an App Store Connect In-App Purchase key (see Generating JWS to sign App Store requests) and passes it to StoreKit as a purchase option. The JWS carries an allowIntroductoryOffer claim which Apple documents as "a Boolean value, true or false, that determines whether the customer is eligible for an introductory offer".
This is useful for any app whose introductory-offer eligibility rules live on its own server rather than being inferred from App Store purchase history — for example when eligibility depends on server-side account state, or when an offer should only be available during a server-determined window.
in_app_purchase_storekit does not currently expose this purchase option, so apps that need it cannot use the plugin's purchase path.
Note this is distinct from the existing isIntroductoryOfferEligible(productId), which wraps Product.SubscriptionInfo.isEligibleForIntroOffer and reads the App Store's default eligibility. That read cannot express a server-signed per-purchase decision, and cannot override the default in either direction.
The API is available on iOS 15.0+ / macOS 12.0+ (declared @backDeployed(before: iOS 18.4, macOS 15.4, ...)), which matches the existing availability floor of the plugin's StoreKit 2 code, so no additional OS version gate is required.
Proposal
Add an optional StoreKit 2-specific field to Sk2PurchaseParam:
Sk2PurchaseParam(
productDetails: productDetails,
introductoryOfferEligibilityCompactJWS: compactJWSFromMyServer,
);forwarded unchanged to Product.PurchaseOption.introductoryOfferEligibility(compactJWS:).
The plugin would treat the JWS as opaque data: never generating, signing, parsing, validating or inspecting it.
Compatibility:
- optional and null by default
- when null, no purchase option is added and the App Store applies its own default eligibility, so existing apps are unaffected
- StoreKit 2 only; no StoreKit 1 behavior change
Activity
[in_app_purchase] Support StoreKit 2 introductory offer eligibility JWS
[in_app_purchase] Support StoreKit 2 introductory offer eligibility J…
[in_app_purchase] Support StoreKit 2 introductory offer eligibility J…
[in_app_purchase] Support StoreKit 2 introductory offer eligibility J…
github-actions commentedon Sep 18, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.