Lens Scripting API
    Preparing search index...

    Class PurchaseWearable Only

    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

    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 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