com.android.billingclient.api / queryPurchaseHistory

queryPurchaseHistory

suspend fun BillingClient.queryPurchaseHistory(skuType: String): PurchaseHistoryResult
Deprecated: Use [BillingClient.queryPurchaseHistory(QueryPurchaseHistoryParams)] instead

Returns the most recent purchase made by the user for each SKU, even if that purchase is expired, canceled, or consumed.

Parameters

skuType - The type of SKU, either "inapp" or "subs"

Return
A PurchaseHistoryResult including a BillingResult and a list of PurchaseHistoryRecords when the request succeeded

suspend fun BillingClient.queryPurchaseHistory(params: QueryPurchaseHistoryParams): PurchaseHistoryResult

Returns the most recent purchase made by the user for each product, even if that purchase is expired, canceled, or consumed.

Parameters

params - Params of type QueryPurchaseHistoryParams required to query purchase history

Return
A PurchaseHistoryResult including a BillingResult and a list of PurchaseHistoryRecords when the request succeeded