interface Purchase {
    accountId: string;
    acknowledged: boolean;
    autoRenewing: false;
    consumed?: boolean;
    developerPayload: 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: false

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
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 the purchased product

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.