# Visibility based on Stripe subscription

**URL:** https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748
**Category:** Get Help
**Created:** [February 4, 2021, 6:32am UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748 "2021-02-04T06:32:30Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DylanS](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@DylanS](https://forum.adalo.com/u/DylanS)
#### Post date: [February 4, 2021, 6:32am UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/1 "2021-02-04T06:32:30Z")

</div>

Hey!  
I never worked with Stripe or payments before, but my goal is simple. Change component visibility based on if the user is subscribed or not.

How do I do this?

I tried making a subscription collection, with subscription plans and prices, this works, but I can’t simply set the visibility correct, because I need multiple filters.

I need to say in this case show component if current Ship → Subscription level is 1 or more (I have 3 levels of subscriptions) and if Subscription end is after today.

I feel like many of you guys already did this and probably way simpler! I couldn’t find any tutorial on subscriptions.

---

<div class="post-metadata">

### Author: ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)
#### Post date: [February 4, 2021, 10:26am UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/2 "2021-02-04T10:26:53Z")

</div>

Couldn’t you have a number subscription property set at 1, 2 or 3. Then display component if current subscription level \> 1 etc.

---

<div class="post-metadata">

### Author: ![DylanS](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@DylanS](https://forum.adalo.com/u/DylanS)
#### Post date: [February 4, 2021, 10:41am UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/3 "2021-02-04T10:41:09Z")

</div>

Unfortunately not, since it is a one to many relationship. A subscription can have many ships.

---

<div class="post-metadata">

### Author: ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)
#### Post date: [February 4, 2021, 10:44am UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/4 "2021-02-04T10:44:22Z")

</div>

You can’t replace that entirely with a subscription level property on ships? Does it need a relationship?

Solves the visibility problem surely.

Then if you want a list of ships depending on their subscription level you’d just filter the list to subscription level = 3 for example.

I might be missing something, but maybe you can just not have a relationship set up here.

---

<div class="post-metadata">

### Author: ![DylanS](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@DylanS](https://forum.adalo.com/u/DylanS)
#### Post date: [February 4, 2021, 11:41am UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/5 "2021-02-04T11:41:23Z")

</div>

The problem is when the sub ends it somehow needs to know that and change the ship, but I Ofcourse can add a sub end date on the ship, stupid me hahahaha. End then simply say if ship → sub end date is after today is visible

Ohh nvm, problem with the end date is that when the date is empty it won’t work:(

But then I could assign each ship a date in the past maybe hmm, should work

---

<div class="post-metadata">

### Author: ![DylanS](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@DylanS](https://forum.adalo.com/u/DylanS)
#### Post date: [February 4, 2021, 2:00pm UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/6 "2021-02-04T14:00:20Z")

</div>

I decided to go with the many to many relationship solution. It’s just way cleaner and more logical.

 ![Schermafbeelding 2021-02-04 om 14.59.17](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/b/b5f1ff7ca4374765005a85772ec640e05da2018b.png)

So unfortunate this can’t work with a many to one, since you can’t filter then:( Hopefully the add “and” and “or” rules soon for the visibility stuff.

Btw, now I can easily add a filter saying sub tier should be lvl 1 or higher

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)
#### Post date: [February 14, 2021, 2:00pm UTC](https://forum.adalo.com/t/visibility-based-on-stripe-subscription/8748/7 "2021-02-14T14:00:57Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
