docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Namespace UnityEngine.Purchasing

    Classes

    AggregateCartValidator

    A cart validator that instead of having a specific implementation runs the validation implementations of the various cart validators passed to the constructor

    AggregateRetryPolicy

    An aggregate retry policy that combines multiple retry policies into one.

    AppleAppStore

    Class containing store information for iOS, tvOS and visionOS builds.

    AppleProductMetadata

    Product definition used by Apple App Store. This is a representation of Product Apple documentation

    Cart

    Represents a shopping cart that contains a collection of CartItem objects.

    CartItem

    Represents an item in a shopping cart, containing a product and its quantity.

    CatalogProvider

    Represents a catalog provider that manages product definitions and their store-specific IDs.

    CodelessCatalogProvider

    Helps to set up CatalogProvider for Codeless IAP.

    CodelessIAPButton

    A GUI component for exposing the current price and allow purchasing of In-App Purchases. Exposes configurable elements through the Inspector.

    CodelessIAPButton.OnOrderConfirmedEvent

    Type of event fired after a confirmed order.

    CodelessIAPButton.OnOrderDeferredEvent

    Type of event fired after deferring to purchase an order.

    CodelessIAPButton.OnOrderPendingEvent

    Type of event fired after a pending order.

    CodelessIAPButton.OnProductFetchFailedEvent

    Type of event fired for each product that failed to be fetched.

    CodelessIAPButton.OnProductFetchedEvent

    Type of event fired after a successful fetching the product information from the store.

    CodelessIAPButton.OnPurchaseCompletedLegacyEvent

    Type of event fired after a successful purchase of a product.

    CodelessIAPButton.OnPurchaseFailedEvent

    Type of event fired after a failed purchase of a product.

    CodelessIAPButton.OnPurchaseFailedLegacyEvent

    Type of event fired after a failed purchase of a product.

    CodelessIAPButton.OnPurchaseFetchedEvent

    Type of event fired for each fetched purchase.

    CodelessIAPButton.OnTransactionsRestoredEvent

    Type of event fired after a restore transactions was completed.

    CodelessIAPStoreListener

    Initializes Unity IAP with the Products defined in the default IAP ProductCatalog. Automatically initializes at runtime load when enabled in the GUI. enableCodelessAutoInitialization Manages CodelessIAPButtons and IAPListeners.

    ConfigurationBuilder

    Builds configuration for Unity Purchasing, consisting of products and store specific configuration details.

    ConfirmedOrder

    The model representing a confirmed order of a product.

    DefaultStoreHelper

    Helper class to manage the default store.

    DeferredOrder

    A model representing a deferred order of a product.

    Deferred orders are not paid for so they do not have a transactionID.

    DeferredPaymentUntilRenewalDateOrder

    A model representing a deferred subscription change order. This is a planned order that has not yet been payed for and that will occur at a certain date in the future.

    Entitlement

    An object describing the Entitlement checked for a given Product.

    ExponentialBackOffRetryPolicy

    Implements an exponential back-off retry policy for handling transient errors.

    ExtensibleProductService

    An abstract store service to extend an existing Product Service which will handle all of the basic IProductService implementations The main purpose of this is to allow a custom store to add implementations of extended features to this service. The calls to IProductService are kept virtual so that the derivations of the base store implementing them can be added to or overridden.

    ExtensiblePurchaseService

    An abstract store service to extend an existing Purchase Service which will handle all of the basic IPurchaseService implementations The main purpose of this is to allow a custom store to add implementations of extended features to this service. The calls to IPurchaseService are kept virtual so that the derivations of the base store implementing them can be added to or overridden.

    ExtensibleStoreService

    An abstract store service to extend an existing Store Service which will handle all of the basic IStoreService implementations The main purpose of this is to allow a custom store to add implementations of extended features to this service. The calls to IStoreService are kept virtual so that the derivations of the base store implementing them can be added to or overridden.

    FailedOrder

    A model representing a failed order of a cart.

    GetAppleProductMetadataExtension

    Extension class to ProductMetadata to add a method to retrieve the Apple Product Metadata

    GetGoogleProductMetadataExtension

    Extension class to ProductMetadata to add a method to retrieve the Google Product Metadata

    GoogleIapSettings

    Represents the settings for Google IAP integration in Unity.

    GooglePlay

    Class for constants referencing GooglePlay

    GoogleProductMetadata

    Product definition used by Google Play Store. This is a representation of ProductDetails Google documentation

    IAPButton

    A GUI component for exposing the current price and allow purchasing of In-App Purchases. Exposes configurable elements through the Inspector.

    IAPButton.OnOrderConfirmedEvent

    Type of event fired after a confirmed order.

    IAPButton.OnOrderDeferredEvent

    Type of event fired after deferring to purchase an order.

    IAPButton.OnOrderPendingEvent

    Type of event fired after a pending order.

    IAPButton.OnProductFetchFailedEvent

    Type of event fired for each product that failed to be fetched.

    IAPButton.OnProductFetchedEvent

    Type of event fired for each fetched product.

    IAPButton.OnPurchaseFailedEvent

    Type of event fired after a failed purchase of a product.

    IAPButton.OnPurchaseFetchedEvent

    Type of event fired for each fetched purchase.

    IAPButton.OnTransactionsRestoredEvent

    Type of event fired after a restore transactions was completed.

    IAPListener

    An invisible GUI component for initializing Unity IAP and processing lifecycle events.

    IAPListener.OnOrderConfirmedEvent

    Type of event fired after updating a confirmed order.

    IAPListener.OnOrderDeferredEvent

    Type of event fired after deferring to purchase an order.

    IAPListener.OnOrderPendingEvent

    Type of event fired after updating a pending order.

    IAPListener.OnProductsFetchFailedEvent

    Type of event fired after failing to fetch products.

    IAPListener.OnProductsFetchedEvent

    Type of event fired after fetching products.

    IAPListener.OnProductsFetchedLegacyEvent

    Legacy event type for fetching products, deprecated in favor of OnProductsFetchedEvent.

    IAPListener.OnPurchaseCompletedLegacyEvent

    Legacy event type for fetching purchases, deprecated in favor of OnPurchasesFetchedEvent.

    IAPListener.OnPurchaseDetailedFailedLegacyEvent

    Legacy event type for detailed purchase failure, deprecated in favor of OnPurchaseFailedEvent.

    IAPListener.OnPurchaseFailedEvent

    Type of event fired after failing to purchase an order.

    IAPListener.OnPurchaseFailedLegacyEvent

    Legacy event type for purchase failure, deprecated in favor of OnPurchaseFailedEvent.

    IAPListener.OnPurchasesFetchFailureEvent

    Type of event fired after failing to fetch purchases.

    IAPListener.OnPurchasesFetchedEvent

    Type of event fired after fetching purchases.

    IDs

    Maps store specific Product identifiers to one or more store identifiers.

    The name is deliberately terse for use as a collection initializer.

    IapException

    Exception associated with the IAP package.

    InvalidCartException

    Exception associated with a cart item.

    InvalidCartItemException

    Exception associated with a cart item.

    InvalidProductTypeException

    An error was found when an invalid Product.definition.type.definition.type is provided.

    LocaleExtensions

    Class that facilitates localization code extensions.

    LocalizedProductDescription

    A description of an IAP product. Includes both a title and a longer description, plus an optional locale for specifying the language of this description. Characters wider than one byte are escaped as \uXXXX for serialization to work around a bug in Unity's JSONUtility deserialization prior to Unity 5.6.

    MacAppStore

    Class containing store information for MacOS builds.

    MaximumNumberOfAttemptsRetryPolicy

    A retry policy that limits the number of attempts to a specified maximum.

    MiniJson

    Extension class for MiniJson to Encode and Decode JSON.

    NoRetriesPolicy

    A retry policy that does not allow any retries.

    NonNullCartValidator

    Cart Validator that simply checks that the cart itself and the items within are not null. Also checks that each item within the cart has a non-null product definition. The other content of the cart items and their format are not checked.

    NullProductIdException

    An error was found when an unexpectedly null Product.definition.id.definition.id is provided.

    NullReceiptException

    An error was found when an unexpectedly null Product.receipt.receipt is provided.

    Order

    The base Model encapsulating an order to purchase a cart.

    Orders

    Encapsulate a complete list of Orders with ConfirmedOrders, PendingOrders and DeferredOrders. Used when fetching purchases.

    PayoutDefinition

    Definition of a purchase payout

    PendingOrder

    A model representing a pending order of a product.

    Price

    Represents a price in a format that is serialized as both a decimal and a double.

    Product

    May be purchased as an In-App Purchase.

    ProductCatalog

    The product catalog represents a list of IAP products, with enough information about each product to do a batch export for Apple's Application Loader or the Google Play CSV import format. To retreive the standard catalog, use ProductCatalog.LoadDefaultCatalog().

    ProductCatalogItem

    Represents a single product from the product catalog. Each item contains some common fields and some fields that are specific to a particular store.

    ProductCatalogPayout

    Represents the definition of a payout in the product catalog.

    ProductCollection

    Provides helper methods to retrieve products by store independent/store specific id.

    ProductDefinition

    Product definition used by Apps declaring products for sale.

    ProductFetchFailed

    Model class describing the failure to fetch products from a Product Service object.

    ProductFetchFailureDescription

    Represents a failed product fetch as described by a product service.

    ProductMetadata

    Metadata for the product, namely that which is relevant to the store subsystem

    PurchaseEventArgs

    A purchase that succeeded, including the purchased product along with its purchase receipt.

    PurchaseFailedEventArgs

    A purchase that failed including the product under purchase, the reason for the failure and any additional information.

    PurchaseFailureDescription

    Represents a failed purchase as described by a purchasing service.

    PurchaseService

    The service responsible for ordering products, fetching previous purchases and validating product entitlements.

    PurchasesFetchFailureDescription

    A model representing the failure to fetch preexisting purchases.

    ReceiptParserException

    Error found during receipt parsing.

    ServiceCreationException

    Exception thrown when an attempt to create a service encounters a problem.

    SimpleCatalogProvider

    A simple implementation of IBaseCatalogProvider that uses a delegate to fetch product definitions. This provider wraps a function delegate to provide product catalog functionality in a straightforward manner.

    SingleProductCartValidator

    A cart validator that checks that only one product is in the cart items list.

    SingleProductSingleQuantityCartValidator

    Cart Validator that checks that the cart contains a single product with a single quantity.

    SingleQuantityCartValidator

    A cart validator that checks that the quantity of each product in the cart is exactly one.

    StandardPurchasingModule

    Module for the standard stores covered by Unity; Apple App store, Google Play and more.

    StoreConnectionFailureDescription

    Represents a failed store connection as described by a store service.

    StoreController

    Main controller class that provides a unified interface for store operations, product management, and purchase handling.

    StoreException

    Exception thrown when an attempt to get a store encounters a problem.

    StoreID

    Represents a pair of store identifier and product id for the store.

    StoreSpecificIds

    Maps store specific Product identifiers to one or more store identifiers.

    The name is deliberately terse for use as a collection initializer.

    StoreSubscriptionInfoNotSupportedException

    An error was found when an unsupported app store Product.receipt.receipt is provided.

    SubscriptionInfo

    A container for a Product's subscription-related information.

    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.

    SubscriptionManager

    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.

    TimeLimitRetryPolicy

    A retry policy that retries operations until a specified time limit is reached. This policy will continue retrying failed operations as long as the total elapsed time is less than the configured time limit.

    TimeSpanUnits

    A period of time expressed in either days, months, or years. Conveys a subscription's duration definition. Note this reflects the types of subscription durations settable on a subscription on supported app stores.

    UnifiedReceipt

    I can unpack JSON Product.receipt values.

    See also https://docs.unity3d.com/Manual/UnityIAPPurchaseReceipts.html

    UnityIAPServices

    Unity IAP Services Entry Point

    UnityPurchasing

    The core abstract implementation for Unity Purchasing.

    Structs

    RetryPolicyInformation

    Contains information about retry attempts for purchase operations. Provides data about the number of retry attempts and timing information for retry policy decisions.

    Interfaces

    IAppleConfiguration

    Access Apple store specific configurations.

    IAppleExtensions

    Access iOS specific functionality.

    IAppleOrderInfo

    The model encapsulating additional information about an Apple order.

    IAppleStoreExtendedProductService

    A public interface for the Apple Store product service extension.

    IAppleStoreExtendedPurchaseService

    A public interface for the Apple Store purchase service extension.

    IAppleStoreExtendedService

    A public interface for the Apple Store store service extension.

    ICart

    Represents a shopping cart that contains items to be purchased.

    ICartValidator

    Interface that allows a cart and its contents to be validated for the purposes of ordering products therein via a store.

    IDetailedStoreListener

    Interface for receiving detailed purchase failure information in Unity IAP.

    IExtensionProvider

    Interface providing access to various store extensions.

    IGoogleOrderInfo

    The model encapsulating additional information about a Google order.

    IGooglePlayConfiguration

    Access Google Play store specific configurations.

    IGooglePlayStoreConnectionUseCase

    Interface for managing the connection to the Google Play Store.

    IGooglePlayStoreExtendedPurchaseService

    A public interface for the Google Play Store purchase service extension.

    IGooglePlayStoreExtendedService

    A public interface for the Google Play Store service extension.

    IGooglePlayStoreExtensions

    Access GooglePlay store specific functionality.

    INativeStore

    An interface to native underlying store systems. Provides a base for opaquely typed communication across a language-bridge upon which additional functionality can be composed. Is used by most public IStore implementations which themselves are owned by the purchasing core.

    IOnEntitlementRevokedCallback

    Interface for receiving callbacks when an entitlement is revoked.

    IOrderInfo

    The model encapsulating additional information about an order.

    IProductCatalogImpl

    For testing

    IProductService

    A service responsible for fetching and storing products available for purchase.

    IProductServiceExtension

    Common interface for all product service extension.

    IPurchaseService

    Public Interface for a service responsible for ordering products, fetching previous purchases and validating product entitlements.

    IPurchaseServiceExtension

    Common interface for all purchase service extension.

    IPurchasedProductInfo

    The model encapsulating additional information about a purchased product.

    IRetryPolicy

    Interface for retry policies used in purchase operations.

    IRetryPolicyInformation

    Interface for providing information about retry policy attempts.

    IStoreCheckEntitlementCallback

    A public interface for a class that handles callbacks for checking entitlements from a Store.

    IStoreConnectCallback

    Interface to handle callbacks for managing the connection to a store.

    IStoreController

    Used by Applications to control Unity Purchasing.

    IStoreExtension

    Common interface for all purchasing extensions.

    IStoreListener

    Implemented by Application developers using Unity Purchasing.

    IStorePurchaseCallback

    A public interface for a class that handles callbacks for purchasing products from a Store.

    IStorePurchaseConfirmCallback

    A public interface for a class that handles callbacks for confirming purchases made.

    IStorePurchaseFetchCallback

    A public interface for a class that handles callbacks for fetching existing purchases from a Store.

    IStoreService

    A service responsible for connecting to a store and its extensions.

    IStoreServiceExtension

    Common interface for all store service extension.

    IStoreWrapper

    Store wrapper containing the store instance and name.

    Enums

    AndroidStore

    The type of Android store being run.

    AndroidStoreMeta

    A meta enum to bookend the app Stores for Android. Mapped from AndroidStore values. Is distinct from AndroidStore to avoid non-unique Enum.Parse and Enum.ToString lookup conflicts. Note these must be synchronized with constants in the AppStore enum.

    AppStore

    The type of Native App store being used.

    AppStoreMeta

    A meta enum to bookend the app Stores for Android. Mapped from AppStore's values. Is distinct from AppStore to avoid non-unique Enum.Parse and Enum.ToString lookup conflicts.

    AppleStorePromotionVisibility

    This enum is a C# representation of the Apple object Product.PromotionInfo.Visibility. https://developer.apple.com/documentation/storekit/product/promotioninfo/visibility

    Converted to a string (ToString) to pass to Apple native code, so do not change these names.

    CodelessButtonType

    The type of a CodelessIAPButton, can be either a purchase or a restore button.

    ConnectionState

    The connection state to a store.

    EntitlementStatus

    The entitlement status of a product

    FakeStoreUIMode

    The various kinds of Fake Store UI presentations. Requires UIFakeStore variant of FakeStore to function.

    GooglePlayProrationMode

    The Google Play proration mode used when upgrading and downgrading subscription. See more

    GooglePlayReplacementMode

    The Google Play replacement mode used when upgrading and downgrading subscription. See more

    IAPButton.ButtonType

    The type of this button, can be either a purchase or a restore button.

    InitializationFailureReason

    Reasons for which purchasing initialization could fail.

    OwnershipType

    This enum is a C# representation of the Apple object OwnershipType. https://developer.apple.com/documentation/storekit/transaction/ownershiptype

    PayoutType

    Type of the purchase payout.

    ProductCatalogPayout.ProductCatalogPayoutType

    Types of Product Payouts. Mirrors the PayoutType enum.

    ProductFetchFailureReason

    The various reasons a product fetch can fail.

    ProductType

    Types of a product, relevant to the store subsystem.

    PurchaseFailureReason

    The various reasons a purchase can fail.

    PurchaseProcessingResult

    Informs Unity Purchasing as to whether an Application has finished processing a purchase.

    PurchasesFetchFailureReason

    The various reasons a purchases fetch can fail.

    Result

    For representing boolean values which may also be not available.

    StoreSpecificPurchaseErrorCode

    The various reasons a purchase can fail. These codes are store-specific, so that developers can have access to to a wider range of debugging information.

    SubscriptionPeriodUnit

    Used internally to parse Apple receipts. Corresponds to Apple SKProductPeriodUnit.

    TranslationLocale

    The locales supported by Google for IAP product translation.

    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)