Preparing search index...

    Represents a completed or pending transaction for a product. When a user buys something, or when their purchase history is retrieved, Purchase objects are received. These objects contain important details like the unique ID of the purchase, the ID of the product that was bought, when the purchase occurred, and its current state (e.g., purchased, pending, or invalidated).

    Hierarchy (View Summary)

    Index

    Properties

    expiryTime: number

    For subscription purchases, the end of the current billing period in milliseconds since the Unix epoch. Not set for non-subscription purchases.

    Lens Scripting Version 377

    isAcknowledged: boolean

    Indicates whether this purchase has been acknowledged via Client#acknowledgePurchase.

    Lens Scripting Version 377

    isAutoRenewing: boolean

    Indicates whether a subscription purchase renews automatically at the end of the current billing period. Always false for non-subscription purchases.

    Lens Scripting Version 377

    productId: string

    The unique identifier for the product that was purchased. It's the same ID you use to identify the product in the store or when querying for product details.

    purchaseState: PurchaseState

    Indicates the current status of the transaction.

    purchaseTime: number

    Represents the exact moment the purchase was made, measured as the number of milliseconds since January 1, 1970, UTC (Unix epoch time). This timestamp is crucial for tracking purchase dates, managing subscriptions, and for reconciliation purposes.

    token: string

    A unique identifier generated by the payment system for the order. It can be useful for linking purchases to specific order records in your backend or for support purposes.

    Methods

    • Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean