docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Product

    May be purchased as an In-App Purchase.

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

    Properties

    appleOriginalTransactionID

    A unique identifier for this Apple product's original transaction.

    This will only be set when the Apple product was purchased during this session.

    Declaration
    [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 string appleOriginalTransactionID { get; }
    Property Value
    Type Description
    string

    appleProductIsRestored

    Indicates if this Apple product is restored.

    Declaration
    [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 bool appleProductIsRestored { get; }
    Property Value
    Type Description
    bool

    availableToPurchase

    Determine if this product is available to purchase according to the store subsystem.

    This will be false if the product's identifier is unknown, incorrect or otherwise disabled with the store provider (ie Apple, Google et al).

    If this is false, purchase attempts will immediately fail.

    Declaration
    public bool availableToPurchase { get; }
    Property Value
    Type Description
    bool

    definition

    Basic immutable product properties.

    Declaration
    public ProductDefinition definition { get; }
    Property Value
    Type Description
    ProductDefinition

    hasReceipt

    Owned Non Consumables and Subscriptions should always have receipts. Consumable's receipts are not persisted between App restarts unless it has a pending transaction. Once a consumable has been acknowledged (ConfirmPendingPurchase) the receipt is removed.

    Declaration
    [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 bool hasReceipt { get; }
    Property Value
    Type Description
    bool

    metadata

    Localized metadata provided by the store system.

    Declaration
    public ProductMetadata metadata { get; }
    Property Value
    Type Description
    ProductMetadata

    The metadata.

    receipt

    The purchase receipt for this product, if owned. For consumable purchases, this will be the most recent purchase receipt. Consumable's receipts are not set between app restarts unless it has a pending transaction. Once a consumable has been acknowledged (ConfirmPendingPurchase) the receipt is removed. Receipts is in JSON format.

    Declaration
    [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 string receipt { get; }
    Property Value
    Type Description
    string

    transactionID

    A unique identifier for this product's transaction. This will only be set when the product was purchased during this session. Consumable's transactionID are not set between app restarts unless it has a pending transaction. Once a consumable has been acknowledged (ConfirmPendingPurchase) the transactionID is removed.

    Declaration
    [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 string transactionID { get; }
    Property Value
    Type Description
    string

    Methods

    Equals(object)

    Check if this product is equal to another.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The product to compare with this object.

    Returns
    Type Description
    bool

    True if the products are equal

    Overrides
    object.Equals(object)

    GetHashCode()

    Get the unique Hash representing the product.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code as integer

    Overrides
    object.GetHashCode()

    ToString()

    Returns a string representation of the product.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the product.

    Overrides
    object.ToString()
    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)