Skip to main content
Question

Dismissing paywall after restore purchases

  • May 13, 2026
  • 2 replies
  • 37 views

Forum|alt.badge.img

I have 2 non-consumable entitlements for my app. In the paywall, I include a “restore purchases” button. I present the paywall with RevenuCatUI.presentPaywall().  When a user taps the “restore purchases” button, the paywall is not dismissed and no update is shown until the user manually dismisses the paywall. Then the modal that I present is shown.

While I’m sure I could make my modal visible via a higher z-index, I’d prefer to have the paywall to be dismissed when the user taps the restore purchases button. AI tells me to use RevenueCatUI.presentPaywallIfNeeded(), but how do I use that with 2 optional entitlements? I.e. present the paywall if either entitlement is missing.

2 replies

alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+6

Hey ​@jvp

Thank you for reaching out!

To add more context, the only way a Paywall will auto-close after a restore is if the SDK knows which entitlement is getting granted with the restore of that purchase. This can be done only when the requiredEntitlementIdentifier parameter is passed to the Paywall.

In your particular case, since entitlements are optional for your products, the SDK cannot guarantee that the correct product/entitlement was restored for that Paywall, so it won’t be dismissed. You will have to handle the dismissal yourself.

Using the PaywallResult from the presentPaywall method should help you determine whether a restore occurred and dismiss the Paywall as needed. 

import RevenueCatUI, { PAYWALL_RESULT } from "react-native-purchases-ui";

// Present paywall for current offering:
const paywallResult: PAYWALL_RESULT = await RevenueCatUI.presentPaywall();
// or if you need to present a specific offering:
const paywallResult: PAYWALL_RESULT = await RevenueCatUI.presentPaywall({
offering: offering // Optional Offering object obtained through getOfferings
});

switch (paywallResult) {
case PAYWALL_RESULT.NOT_PRESENTED:
case PAYWALL_RESULT.ERROR:
case PAYWALL_RESULT.CANCELLED:
case PAYWALL_RESULT.PURCHASED:
case PAYWALL_RESULT.RESTORED:
// Dismiss Paywall here as needed
default:
}

Just so you know, the PAYWALL_RESULT.RESTORED will only get returned if a purchase was restored for the Store Account configured on the device.

Hope this helps!


Forum|alt.badge.img
  • Author
  • New Member
  • May 23, 2026

Thanks. I decided to use <RevenueCatUI.Paywall> instead, which gives me better control.