interface Purchase {
    accountId: string;
    acknowledged: boolean;
    autoRenewing: boolean;
    consumed?: boolean;
    developerPayload: string;
    expiryTimeMillis?: string;
    getPurchaseState: PurchaseState;
    orderId?: string;
    packageName: string;
    productId: string;
    productIds: string[];
    profileId: string;
    purchaseState: number;
    purchaseTime: number;
    purchaseToken: string;
    quantity: number;
    receipt: string;
    signature: string;
}

Properties

accountId: string

Obfuscated account id specified at purchase - by default md5(applicationUsername)

acknowledged: boolean

Whether the purchase has been acknowledged.

autoRenewing: boolean

Whether the subscription renews automatically.

consumed?: boolean

Whether the purchase has been consumed

developerPayload: string

Payload specified when the purchase was acknowledged or consumed.

Deprecated

  • This was removed from Billing v5
expiryTimeMillis?: string

For subscriptions, timestamp of expiration in milliseconds

getPurchaseState: PurchaseState

One of BridgePurchaseState indicating the state of the purchase.

orderId?: string

Unique order identifier for the transaction. (like GPA.XXXX-XXXX-XXXX-XXXXX)

packageName: string

Application package from which the purchase originated.

productId: string

Identifier of the purchased product.

Deprecated

  • use productIds (since Billing v5 a single purchase can contain multiple products)
productIds: string[]

Identifier of the purchased products

profileId: string

Obfuscated profile id specified at purchase - used when a single user can have multiple profiles

purchaseState: number

Purchase state in the original JSON

Deprecated

  • use getPurchaseState
purchaseTime: number

Time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).

purchaseToken: string

Token that uniquely identifies a purchase for a given item and user pair.

quantity: number

Quantity of items purchased in a single transaction.

For consumable products, this value represents the number of items purchased. For non-consumable products and subscriptions, this value is always 1.

This is particularly useful for apps that support multi-quantity purchases through Google Play Billing Library.

receipt: string

String in JSON format that contains details about the purchase order.

signature: string

String containing the signature of the purchase data that was signed with the private key of the developer.