docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SubscriptionInfoHelper

    Use to query in-app purchasing subscription product information, and upgrade subscription products. Supports the Apple App Store, Google Play store. Note expiration dates may become invalid after updating subscriptions between two types of duration.

    Inheritance
    object
    SubscriptionInfoHelper
    SubscriptionManager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public class SubscriptionInfoHelper

    Constructors

    SubscriptionInfoHelper(string, string, string)

    Construct an object that allows inspection of a subscription product.

    Declaration
    public SubscriptionInfoHelper(string receipt, string id, string introJson)
    Parameters
    Type Name Description
    string receipt

    A Unity IAP unified receipt from Product.receipt.receipt

    string id

    A product identifier.

    string introJson

    From IAppleStoreExtendedProductService.GetIntroductoryPriceDictionary.GetIntroductoryPriceDictionary

    See Also
    GetIntroductoryPriceDictionary()

    SubscriptionInfoHelper(Product, string)

    Construct an object that allows inspection of a subscription product.

    Declaration
    public SubscriptionInfoHelper(Product product, string introJson)
    Parameters
    Type Name Description
    Product product

    Subscription to be inspected

    string introJson

    From IAppleStoreExtendedProductService.GetIntroductoryPriceDictionary.GetIntroductoryPriceDictionary

    See Also
    GetIntroductoryPriceDictionary()

    Methods

    GetSubscriptionInfo()

    Convert my Product into a SubscriptionInfo. My Product.receipt must have a "Payload" JSON key containing supported native app store information, which will be converted here.

    Declaration
    public SubscriptionInfo GetSubscriptionInfo()
    Returns
    Type Description
    SubscriptionInfo

    Returns the SubscriptionInfo

    Exceptions
    Type Condition
    NullProductIdException

    My Product must have a non-null product identifier

    StoreSubscriptionInfoNotSupportedException

    A supported app store must be used as my product

    NullReceiptException

    My product must have a receipt

    InvalidProductTypeException

    For non-subscription product types

    See Also
    GetIntroductoryPriceDictionary()

    See Also

    GetIntroductoryPriceDictionary()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)