docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Store

    Extension point for purchasing plugins.

    An abstract class is provided so that methods can be added to the IStore without breaking binary compatibility with existing plugins.

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

    Constructors

    Store()

    Initializes a new instance of the Store class.

    Declaration
    protected Store()

    Fields

    ConfirmCallback

    Callback for handling purchase confirmation operations from the store.

    Declaration
    protected IStorePurchaseConfirmCallback? ConfirmCallback
    Field Value
    Type Description
    IStorePurchaseConfirmCallback

    ConnectCallback

    Callback for handling store connection operations.

    Declaration
    protected IStoreConnectCallback? ConnectCallback
    Field Value
    Type Description
    IStoreConnectCallback

    EntitlementCallback

    Callback for handling entitlement check operations from the store.

    Declaration
    protected IStoreCheckEntitlementCallback? EntitlementCallback
    Field Value
    Type Description
    IStoreCheckEntitlementCallback

    EntitlementRevokedCallback

    Callback for handling revoked entitlement notifications from the store.

    Declaration
    protected IOnEntitlementRevokedCallback? EntitlementRevokedCallback
    Field Value
    Type Description
    IOnEntitlementRevokedCallback

    ProductsCallback

    Callback for handling products response from the store.

    Declaration
    protected IStoreProductsCallback? ProductsCallback
    Field Value
    Type Description
    IStoreProductsCallback

    PurchaseCallback

    Callback for handling purchase operations from the store.

    Declaration
    protected IStorePurchaseCallback? PurchaseCallback
    Field Value
    Type Description
    IStorePurchaseCallback

    PurchaseFetchCallback

    Callback for handling purchase fetch operations from the store.

    Declaration
    protected IStorePurchaseFetchCallback? PurchaseFetchCallback
    Field Value
    Type Description
    IStorePurchaseFetchCallback

    Methods

    CheckEntitlement(ProductDefinition)

    Checks the entitlement status for the specified product.

    Declaration
    public abstract void CheckEntitlement(ProductDefinition product)
    Parameters
    Type Name Description
    ProductDefinition product

    The product definition to check entitlement for.

    Connect()

    Establishes a connection to the store.

    Declaration
    public abstract void Connect()

    FetchProducts(IReadOnlyCollection<ProductDefinition>)

    Fetches product information from the store for the specified products.

    Declaration
    public abstract void FetchProducts(IReadOnlyCollection<ProductDefinition> products)
    Parameters
    Type Name Description
    IReadOnlyCollection<ProductDefinition> products

    The collection of product definitions to fetch information for.

    FetchPurchases()

    Fetches existing purchases from the store.

    Declaration
    public abstract void FetchPurchases()

    FinishTransaction(PendingOrder)

    Completes a pending purchase transaction.

    Declaration
    public abstract void FinishTransaction(PendingOrder pendingOrder)
    Parameters
    Type Name Description
    PendingOrder pendingOrder

    The pending order to finish.

    Purchase(ICart)

    Initiates a purchase transaction for the items in the specified cart.

    Declaration
    public abstract void Purchase(ICart cart)
    Parameters
    Type Name Description
    ICart cart

    The cart containing items to purchase.

    SetEntitlementCheckCallback(IStoreCheckEntitlementCallback)

    Sets the callback for entitlement check operations.

    Declaration
    public virtual void SetEntitlementCheckCallback(IStoreCheckEntitlementCallback entitlementCallback)
    Parameters
    Type Name Description
    IStoreCheckEntitlementCallback entitlementCallback

    The callback to handle entitlement check responses.

    SetOnRevokedEntitlementCallback(IOnEntitlementRevokedCallback)

    Sets the callback for revoked entitlement notifications.

    Declaration
    public virtual void SetOnRevokedEntitlementCallback(IOnEntitlementRevokedCallback entitlementRevokedCallback)
    Parameters
    Type Name Description
    IOnEntitlementRevokedCallback entitlementRevokedCallback

    The callback to handle revoked entitlement notifications.

    SetProductsCallback(IStoreProductsCallback)

    Sets the callback for products operations.

    Declaration
    public virtual void SetProductsCallback(IStoreProductsCallback productsCallback)
    Parameters
    Type Name Description
    IStoreProductsCallback productsCallback

    The callback to handle products responses.

    SetPurchaseCallback(IStorePurchaseCallback)

    Sets the callback for purchase operations.

    Declaration
    public virtual void SetPurchaseCallback(IStorePurchaseCallback purchaseCallback)
    Parameters
    Type Name Description
    IStorePurchaseCallback purchaseCallback

    The callback to handle purchase responses.

    SetPurchaseConfirmCallback(IStorePurchaseConfirmCallback)

    Sets the callback for purchase confirmation operations.

    Declaration
    public virtual void SetPurchaseConfirmCallback(IStorePurchaseConfirmCallback confirmCallback)
    Parameters
    Type Name Description
    IStorePurchaseConfirmCallback confirmCallback

    The callback to handle purchase confirmation responses.

    SetPurchaseFetchCallback(IStorePurchaseFetchCallback)

    Sets the callback for purchase fetch operations.

    Declaration
    public virtual void SetPurchaseFetchCallback(IStorePurchaseFetchCallback fetchPurchaseCallback)
    Parameters
    Type Name Description
    IStorePurchaseFetchCallback fetchPurchaseCallback

    The callback to handle purchase fetch responses.

    SetStoreConnectionCallback(IStoreConnectCallback)

    Sets the callback for store connection operations.

    Declaration
    public virtual void SetStoreConnectionCallback(IStoreConnectCallback storeConnectCallback)
    Parameters
    Type Name Description
    IStoreConnectCallback storeConnectCallback

    The callback to handle store connection responses.

    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)