Help on Stripe Paid Status

Hey guys! In my application, I have teams which comprise of an “admin” user and then normal users they can invite to the team. Ive attached the “payment_status” field to the team itself and update that based off the Stripe webhook (checkout paid / unpaid)

What Im confused about is how I can lock the interface of my application for all users inside that team when that team is paid. I understand the basics of user roles / groups, but am unsure how this would work since I have the “payment_status” attached to the team itself and not the user.

Any advice here would be appreciated! Thanks :slight_smile:

Hey,

One way to do it would be to fetch the current’s user team (and its status) as a collection or bring it inside the user’s getMe endpoint. Then, you could base the access rights on the user or check it at page level based on the collection.