docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IStoreController

    Used by Applications to control Unity Purchasing.

    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    [Obsolete("This API is deprecated. Please upgrade to the new APIs introduced in IAP v5. For more information, visit the IAP manual: https://docs.unity.com/ugs/en-us/manual/iap/manual/upgrade-to-iap-v5", false)]
    public interface IStoreController

    Properties

    products

    Gets the collection of products in the store.

    Declaration
    ProductCollection products { get; }
    Property Value
    Type Description
    ProductCollection

    The product collection.

    Methods

    ConfirmPendingPurchase(Product)

    Where an Application returned ProcessingResult.Pending from IStoreListener.ProcessPurchase(), Applications should call this method when processing completes.

    Declaration
    void ConfirmPendingPurchase(Product product)
    Parameters
    Type Name Description
    Product product

    The product for which its pending purchase it to be confirmed.

    FetchAdditionalProducts(HashSet<ProductDefinition>, Action, Action<InitializationFailureReason, string>)

    Fetch additional products from the controlled store.

    Declaration
    void FetchAdditionalProducts(HashSet<ProductDefinition> additionalProducts, Action successCallback, Action<InitializationFailureReason, string> failCallback)
    Parameters
    Type Name Description
    HashSet<ProductDefinition> additionalProducts

    The set of product definitions to be fetched.

    Action successCallback

    The event triggered on a successful fetch.

    Action<InitializationFailureReason, string> failCallback

    The event triggered on a failed fetch. Contains the FailureReason and an optional error message.

    InitiatePurchase(string)

    Initiate a purchase from the controlled store

    Declaration
    void InitiatePurchase(string productId)
    Parameters
    Type Name Description
    string productId

    The id of the product to be purchased.

    InitiatePurchase(string, string)

    Initiate a purchase from the controlled store.

    Declaration
    void InitiatePurchase(string productId, string payload)
    Parameters
    Type Name Description
    string productId

    The id of the product to be purchased.

    string payload

    The developer payload provided for certain stores that define such a concept (ex: Google Play).

    InitiatePurchase(Product)

    Initiate a purchase from the controlled store.

    Declaration
    void InitiatePurchase(Product product)
    Parameters
    Type Name Description
    Product product

    The product to be purchased.

    InitiatePurchase(Product, string)

    Initiate a purchase from the controlled store.

    Declaration
    void InitiatePurchase(Product product, string payload)
    Parameters
    Type Name Description
    Product product

    The product to be purchased.

    string payload

    The developer payload provided for certain stores that define such a concept (ex: Google Play).

    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)