Skip to main content
Solved

What does the Paywall check to indicate that a user has already used the free trial offer?

  • March 25, 2025
  • 1 reply
  • 22 views

Forum|alt.badge.img

I want to have some primer text before displaying the paywall, the text would change depending on whether a user has already used the trial.

Given this scenario: 
User A logs in, starts trial and subscription, we have a hook to update our platform to reflect that the user is now premium, and then user A logs out of the app after a while.

User B logs into the same device, isn’t premium so sees the primer 

The Google account has used the trial before, which seems to be reflected in the paywall but I don’t know how we are supposed to check that same state for our primer.

This answer

suggests using the entitlements, which does work but not for a new user. There is a suggestion at the bottom of that page to sync purchases but we don’t want to transfer purchasing from one user to another.

 

Really I would just like to know what does the paywall check. Do I need to fetch all the offerings, and check all the packages to see whether the products have a freeTrial subscriptionOption?

Best answer by jeffrey_bunn

Hi ​@declan-mcdev! My colleague Peter replied to your support ticket about this, and I’ve copied the relevant part of his reply below, for context:

Unfortunately the method that our paywall uses to check for eligibility does check per-product, so the product you're looking to inspect does need to be known beforehand. If you're pulling down the offering prior to showing a paywall, you can check each product via product.getSubscriptionOptions().getDefaultOffer().getFreePhase() != null to determine if a trial is available--this is the method our paywall uses to check for eligibility. It pulls back the state of the default offer we'll auto-select on the paywall, so if you're using our paywalls product, this would align with what it will show.
 
Using syncPurchases or checking history for existing users as the guide you'd already found tend to be a bit easier than checking through all products if you have a lengthy product list, but if you already know the offering that the user should be shown on a paywall or if you have a short list of product options, iterating through the product options with this to check for eligibility should be very quick.

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

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6

Hi ​@declan-mcdev! My colleague Peter replied to your support ticket about this, and I’ve copied the relevant part of his reply below, for context:

Unfortunately the method that our paywall uses to check for eligibility does check per-product, so the product you're looking to inspect does need to be known beforehand. If you're pulling down the offering prior to showing a paywall, you can check each product via product.getSubscriptionOptions().getDefaultOffer().getFreePhase() != null to determine if a trial is available--this is the method our paywall uses to check for eligibility. It pulls back the state of the default offer we'll auto-select on the paywall, so if you're using our paywalls product, this would align with what it will show.
 
Using syncPurchases or checking history for existing users as the guide you'd already found tend to be a bit easier than checking through all products if you have a lengthy product list, but if you already know the offering that the user should be shown on a paywall or if you have a short list of product options, iterating through the product options with this to check for eligibility should be very quick.


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