Skip to main content
Solved

Purchases.shared.restoreTransactions for products

  • July 30, 2021
  • 1 reply
  • 91 views

Forum|alt.badge.img+2

Hey there!

 

I’m gonna to restore user’s purchases

and using this method “Purchases.shared.restoreTransactions { (purchaserInfo, error) in { }”

 

BUT! I’d like check the purchases by Identifier in which indicated in Products, when I address to “purchaserInfo”. How can I implement this?

Best answer by sharif

Hello!

It depends what you want to do, but if you want to check which products have been purchased:

  • purchaserInfo.activeSubscriptions is a set that contains any active subscriptions. You can look up subscriptions by product identifier.
  • purchaserInfo.nonSubscriptionTransactions is an array that contains all non-subscription products purchased (lifetime and consumable). You can loop through the array to see what products have been purchased and the dates they were purchased.

You can read our guide on getting the user’s information for more information on what’s returned in the purchaserInfo.

View original
Did this post help you find an answer to your question?
This post has been closed for comments

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • July 30, 2021

Hello!

It depends what you want to do, but if you want to check which products have been purchased:

  • purchaserInfo.activeSubscriptions is a set that contains any active subscriptions. You can look up subscriptions by product identifier.
  • purchaserInfo.nonSubscriptionTransactions is an array that contains all non-subscription products purchased (lifetime and consumable). You can loop through the array to see what products have been purchased and the dates they were purchased.

You can read our guide on getting the user’s information for more information on what’s returned in the purchaserInfo.


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