there is a method like the following in the android billing library.
https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord