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
AmazonApps
Class for constants referencing Amazon
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
CartItem
CatalogProvider
CheckEntitlementException
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.OnPurchaseFailedEvent
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 Product
s defined in the default IAP ProductCodelessIAPButton
s and IAPListener
s.
ConfigurationBuilder
Builds configuration for Unity Purchasing, consisting of products and store specific configuration details.
ConfirmOrderException
Exception thrown when an attempt to confirm a purchase encounters a problem.
ConfirmedOrder
The model representing a confirmed order of a product.
DefaultStoreHelper
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
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
GoogleFinishTransactionUseCase
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.OnPurchaseFailedEvent
Type of event fired after failing to purchase an order.
IAPListener.OnPurchasesFetchFailureEvent
Type of event fired after failing to fetch purchases.
IAPListener.OnPurchasesFetchedEvent
Type of event fired after fetching purchases.
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
MiniJson
Extension class for MiniJson to Encode and Decode JSON.
NoRetriesPolicy
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 Order.cs with ConfirmedOrders and PendingOrders. 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.
ProductFetchException
Error found performing a fetch of products from a store.
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
ProductService
The core API implementation of the Product Service, the main class used to fetch and store products from the Store Service.
ProductServiceFactory
PurchaseEventArgs
A purchase that succeeded, including the purchased product along with its purchase receipt.
PurchaseException
Exception thrown when an attempt to purchase a product encounters a problem.
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.
PurchaseFetchException
Exception thrown when an fetching purchases encounters a problem.
PurchaseService
The service responsible for ordering products, fetching previous purchases and validating product entitlements.
PurchaseServiceFactory
PurchasesFetchFailureDescription
A model representing the failure to fetch preexisting purchases.
ReceiptParserException
Error found during receipt parsing.
RestoreTransactionException
ServiceCreationException
Exception thrown when an attempt to create a service encounters a problem.
SimpleCatalogProvider
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.
StoreConnectionException
Exception associated store connection.
StoreConnectionFailureDescription
Represents a failed store connection as described by a store service.
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.
StoreServiceFactory
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, and Amazon AppStore. Note Amazon support offers no subscription duration information. 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, and Amazon AppStore. Note Amazon support offers no subscription duration information. Note expiration dates may become invalid after updating subscriptions between two types of duration.
TimeLimitRetryPolicy
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
var unifiedReceipt = JsonUtility.FromJson<UnifiedReceipt>(purchEvtArg.purchasedProduct.receipt)
Debug.LogFormat("{0} {1} {2}", unifiedReceipt.Payload, unifiedReceipt.Store, unifiedReceipt.TransactionID);
UnityIAPServices
Unity IAP Services Entry Point
UnityPurchasing
The core abstract implementation for Unity Purchasing.
Structs
RetryPolicyInformation
Interfaces
IAmazonAppsExtendedProductService
A public interface for the Amazon App Store product service extension.
IAmazonAppsStoreExtendedService
A public interface for the Amazon App Store service extension.
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.
IAsyncDelayer
ICart
ICartValidator
Interface that allows a cart and its contents to be validated for the purposes of ordering products therein via a store.
ICheckEntitlementUseCase
Public Interface to check if a given product has been entitled.
IConfirmOrderUseCase
Public Interface for the confirmation of pending orders.
IDetailedStoreListener
IExtensionProvider
Interface providing access to various store extensions.
IFetchProductsUseCase
A public interface for a class that acts out the use case of fetching products.
IFetchPurchasesUseCase
Public interface for the fetching of pre-existing product purchases.
IGooglePlayChangeSubscriptionCallback
Interface for a class that handles callbacks for changing a subscription from the Google Play Store.
IGooglePlayConfiguration
Access Google Play store specific configurations.
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.
IGooglePlayStoreSetObfuscatedIdUseCase
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
IOnEntitlementRevokedUseCase
Public Interface to get notified 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. Tasks requiring a connection to Stores (Apple App Store or Google Play Store for example) executed without ConnectionState.Connected will throw a StoreConnectionException.
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. Tasks requiring a connection to Stores (Apple App Store or Google Play Store for example) executed without ConnectionState.Connected will throw a StoreConnectionException.
IPurchaseServiceExtension
Common interface for all purchase service extension.
IPurchaseUseCase
IPurchasedProductInfo
The model encapsulating additional information about a purchased product.
IRetryPolicy
IRetryPolicyInformation
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.
IStoreFactory
Store factory interface used to create stores.
IStoreListener
Implemented by Application developers using Unity Purchasing.
IStoreManagerFactoryInjectionPoint
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.
GoogleBillingConnectionState
This is C# representation of the Java Class Purchase See more
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.