1 year ago

#100651

test-img

Lora Georgieva

How to get purchase history made with Google Play Billing?

I'm using Google Play Billing Library, v 4.0. Is there a way to retrieve all purchase orders (purchase history) for the currently logged-in account of the device? I've tried with queryPurchaseHistoryAsync(String skuType, PurchaseHistoryResponseListener listener) of billingClient and the result inside the callback onPurchaseHistoryResponse(BillingResult billingResult, List<PurchaseHistoryRecord> purchaseHistoryRecordList), the list - has 10 elements, but not the latest ones.

Before calling the function, the billing client is set up, and startConnection() has been called.

In documentation, it's said that queryPurchaseHistoryAsync() "Returns the most recent purchase made by the user for each SKU, even if that purchase is expired, canceled, or consumed."

Any ideas would be useful. :)

EDIT:

queryPurchaseHistoryAsync() returns for each sku the last purchase, so they are the latest but for every product. Is there a chance to get history like those in Google play app -> Payments & subscriptions -> Budget & history?

android

android-billing

play-billing-library

android-inapp-purchase

0 Answers

Your Answer

Accepted video resources