Skip to main content
Question

Best Way to show purchase history

  • 6 September 2023
  • 1 reply
  • 117 views

Forum|alt.badge.img+4

What are the best practices for showing users’ their purchase history (for one time purchase consumables-not entitlements)? I especially want to make sure that users can see their purchase history if they attempted to make a purchase and it failed-so they can easily check to see if the purchase failed before or after they paid.

Should I show them my own custom purchase list generated from `getCustomerInfo` or are there iOS and Play Store pages that I link them out to? The latter seems preferrable because, in the end, that is the true source of truth. But I’m not sure where to find such pages and how to link the user to them?

1 reply

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 328 replies
  • September 8, 2023

Hey @caseycrogers

I’d probably recommend handling the error right in the moment - so if the customer’s purchase failed before they paid, triggering a modal or something that lets them know that there was an error, please try again. The `purchase(package:)` method will throw an error if there is a failure while purchasing. 

Otherwise, you can use the `getCustomerInfo` object that returns from a successful purchase to create a purchase history in the customer’s profile, or to add the consumable in a visible way such as adding tokens to their bank, for example.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings