Visibility based on Stripe subscription

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.

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

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

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.

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

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

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

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