Skip to main content
Version: 3.0

Step 5. Check access to paid content

When determining if a user has access to specific paid content, you'll need to verify their access level. This means checking if the user has at least one access level, and if that level is the required one.

You can do this by looking at the user profile, which contains all available access levels.

Now, let’s allow users to purchase your product:

  1. Double-click the button that should show the paid content.
  2. Open the Actions section in the right pane if it’s not already open.
  3. Open the Action Flow Editor.
  4. In the Select Action Trigger window, choose On Tap.
  5. In the No Actions Created window, click the Add Conditional Action button.
  6. In the Actions Flow Editor window, choose Combine Conditions.
  1. In the Set Actions Arguments section, choose currentProfile variable. This is the Adapty variable that holds data about the current user's profile
  2. Fill in the fields as follows:
ParameterValue
Available OptionsData Structure Field
Select FieldaccessLevels
Available OptionsList Contains Items
  1. Click UNSET.
  2. In the new Set Variable window, fill in the fields as follows:
ParameterValue
Available OptionsData Structure Field
Select FieldaccessLevels
Available OptionsIs Set and Not Empty
  1. Click the Confirm button.
  2. Click UNSET for the second condition.
  3. In the new Set Variable window, fill in the fields as follows:
ParameterValue
Available OptionsData Structure Field
Select FieldaccessLevels
List Index OptionsFirst
Available OptionsData Structure Field
Select FieldaccessLevels
Available OptionsData Structure Field
Select FieldisActive
  1. Click the Confirm button twice.

Now, add the actions for what happens next — if the user has the right subscription or not. Either take them to the next page or show the paywall so they can buy access.