Skip to main content
Question

Paywall always displays - Entitlement check is not working for sandbox data


patrick-metzger
Forum|alt.badge.img

I’m trying to test my app before sending it out for beta in TestFlight. I need to make sure the paywall works properly, but there seems to be an issue.

I built my app in Flutterflow. The way I have things set up:

  • A user can add one project and do whatever they want with that project
  • If they try to add more than one project (numProjects !=0), I trigger the Revenuecat “Paywall” action, providing the entitlement ID
  • I then have forking logic that checks if the user has that entitlement
  • If the user has the entitlement, they should be able to move forward and add a project without interruption
  • If the user doesn’t have the entitlement, they should see the paywall component I built

But I’m testing in my local environment (on my iPhone via XCode) with a Sandbox user, and the paywall component displays every single time, even though I can see in Revenuecat that this user has the entitlement. The first time I went through the flow, I was able to make the purchase with the Sandbox user, and I see them in Revenuecat, but I’m still seeing the paywall component.

Is it just because it’s a sandbox user that the entitlement isn’t returned?

I chatted with Claude.ai a bit, and the suggestion was about caching, so I added a “Restore purchases” button. But even after tapping that, when I go back to add a project, I see the paywall component.

Help!

4 replies

chris_perriam
RevenueCat Staff
Forum|alt.badge.img

Hi ​@patrick-metzger , entitlements should still work correctly even if a sandbox environment is being used. I’ve attached some screenshots of a sample implementation, is this a similar flow to the one your app uses?


patrick-metzger
Forum|alt.badge.img

Hi Chris,

Yes, that’s the logic exactly.

Below are some screenshots to document my specific implementation, but it’s almost exactly the same as what you’ve described.

  1. The system checks if the number of projects the user has is 0. If so, they can just make a project.
  2. If not (i.e. they already have a project), the Revenuecat paywall check happens.
  3. Then there’s the check for the Revenuecat entitlement. If the person has the entitlement, they should just go on to creating a project from here (there’s some logic about whether the user has toggled on haptics, but that’s the basic idea).
  4. If the person does not have the entitlement, they should see the paywall component I’ve created in my app.
  5. Then on the paywall, if the user taps “Upgrade to Pro”, the Revenuecat Purchase action happens.

I can see the customer profile in Revenuecat, so I know the purchase went through successfully. I can see that the entitlement is the correct one. But somehow, the paywall component is always displayed.

I’ve tried it now in my local environment (with a Sandbox account), and in TestFlight (with my “real” account, but no money spent because fees aren’t charged in TestFlight).


chris_perriam
RevenueCat Staff
Forum|alt.badge.img

@patrick-metzger Thanks for the additional details! I’m having trouble opening those attachments though. If you don’t mind, could you please open a support ticket? I’ll then be able to review your project configuration as well.

https://app.revenuecat.com/settings/support


chris_perriam
RevenueCat Staff
Forum|alt.badge.img

Updating this with the resolution:

The issue was that the flow was evaluating an incorrect Entitlement ID. I’ve attached a screenshot showing where to source the correct ID to use in your app/flow.

 

Thanks for reaching out ​@patrick-metzger!


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