Solved

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

  • 7 February 2024
  • 1 reply
  • 33 views

Badge +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?

 

 

icon

Best answer by Michael Fogel 9 February 2024, 19:08

View original

1 reply

Userlevel 4
Badge +6

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! 

Reply