Skip to main content
Solved

[React Native] PAYWALL_RESULT.RESTORED is returned even though there was nothing to restore


Forum|alt.badge.img+1

Not sure if bug or intended, but I noticed that after paywall is triggered by  RevenueCatUI.presentPaywallIfNeeded() and user presses "Restore" (they have no subscription to restore) and then dismiss the paywall, RevenueCatUI.presentPaywallIfNeeded() returns PAYWALL_RESULT.RESTORED (in the jsdoc it says that this will be return if successful restore happened, but this is not the case).

The problem is that I can't rely on PAYWALL_RESULT.RESTORED in my code.

Any ideas?

 

 

Best answer by Michael Fogel

Hey @Sigys !

 

This field is for displaying the result of presenting a paywall. This will be the last situation the user experienced before the paywall closed. This is not for displaying the result of if the customer has successfully restored a purchase via the paywall or not. “RESTORED” will be returned if a successful restore happened for showing the paywall, so in this case this seems like it is the correct response if the user is able to see the paywall on their device. The other responses/cases can be found here

 

Let me know if that helps! 

View original
Did this post help you find an answer to your question?

2 replies

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • Answer
  • February 9, 2024

Hey @Sigys !

 

This field is for displaying the result of presenting a paywall. This will be the last situation the user experienced before the paywall closed. This is not for displaying the result of if the customer has successfully restored a purchase via the paywall or not. “RESTORED” will be returned if a successful restore happened for showing the paywall, so in this case this seems like it is the correct response if the user is able to see the paywall on their device. The other responses/cases can be found here

 

Let me know if that helps! 


Forum|alt.badge.img+2
  • New Member
  • 1 reply
  • November 19, 2024

"If a successful restore happened inside the paywall"

This comment is confusing. It would be better to rephrase it to make it clearer.


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