Use this page with AI
Copy this into your coding assistant and add your request.
Read https://openiap.dev/docs/types/subscription-product and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.
My request: [describe what customers should be able to do]ProductSubscription
ProductSubscription#
Represents a subscription product available for purchase. Extends the base Product type with subscription-specific fields like pricing phases, introductory offers, and billing periods.
Cross-platform subscription product shape. iOS: derived from Product with subscription populated (Apple docs). Android: derived from ProductDetails with subscriptionOfferDetails (Google docs).
Native references: Apple · Product.SubscriptionInfo · Google · ProductDetails.SubscriptionOfferDetails
Common Fields#
Inherits every field from Product common fields (id, title, description, displayName, displayPrice, currency, price, debugDescription), plus the subscription-only override and standardized subscription offer array below.
| Name | Type | Summary |
|---|---|---|
type | "subs" | Always "subs" for subscription products (overrides the parent type discriminator). |
subscriptionOffers | SubscriptionOffer[] | Cross-platform offer list. Populated from StoreKit 2 promotional offers on iOS and from Play Billing offer details on Android. |
Platform-Specific Fields#
ProductSubscriptionIOS#
Additional fields available on iOS subscriptions:
| Name | Summary |
|---|---|
introductoryPriceIOS | Formatted introductory price (e.g., "$0.99") |
introductoryPriceAsAmountIOS | Numeric introductory price value |
introductoryPricePaymentModeIOS | Payment mode for intro offer (FreeTrial, PayAsYouGo, PayUpFront) |
introductoryPriceNumberOfPeriodsIOS | Number of periods for intro pricing |
introductoryPriceSubscriptionPeriodIOS | Period unit for intro pricing (Day, Week, Month, Year) |
subscriptionPeriodNumberIOS | Number of units in a subscription period |
subscriptionPeriodUnitIOS | Period unit (Day, Week, Month, Year) |
subscriptionGroupIdIOS | App Store subscription group identifier used by isEligibleForIntroOfferIOS |
pricingTermsIOS | StoreKit 26.4 billing plan choices for this subscription. Each term includes billing price, billing period, monthly or up-front plan type, commitment info, and plan-specific subscription offers. See SubscriptionPricingTermsIOS. |
typeIOS | Detailed product type — for subscriptions this is almost always auto-renewable-subscription (or non-renewing-subscription). |
displayNameIOS | iOS-specific display name |
isFamilyShareableIOS | Whether the subscription supports Family Sharing |
jsonRepresentationIOS | Raw StoreKit 2 JWS payload |