# How do I set up subscription gated content?

**URL:** <https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544>\
**Category:** How do I?\
**Tags:** gate-content, authentication\
**Created:** [September 23, 2023, 5:43am UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544 "2023-09-23T05:43:04Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 23, 2023, 5:43am UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/1 "2023-09-23T05:43:04Z")

</div>

Hi!

I found this tutorial here: [TUTORIAL – How to Setup Xano Authentication and Gate Content in WeWeb 🔐](https://community.weweb.io/t/tutorial-how-to-setup-xano-authentication-and-gate-content-in-weweb/276) which looks like the way to set up the user authentication piece to gate content, but I don’t see anything in the stripe documentation (I’m assuming that’s the payment processor we should use) for creating a subscription as part of that gate: [Stripe | WeWeb documentation](https://docs.weweb.io/plugins/extensions/stripe.html)

What I’d like to do, is create 3 different account levels:  
-Free = users have access to 20% of content.  
-$5/month = users have access to 50% of content  
-$10/month = users have access to 100% of content

I was looking to see if we could use Discord for authentication, but I didn’t find any details on it for weweb. I am woefully unprepared to try to tackle it on my own.

If I follow the Xano Authentication tutorial, what will I need to do in order to enable the subscription piece? Is there documentation on how to build that which I just haven’t found yet? @Joyce

Thanks a bunch!

-Brendan

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [September 23, 2023, 6:22am UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/2 "2023-09-23T06:22:40Z")

</div>

As far as I know, there is no Stripe x Weweb documentation for subscriptions. You have to do the Stripe payment configuration back end. Call the Stripe API from Xano… if you want subscriptions you can’t use the Stripe Weweb plugin

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 23, 2023, 8:15pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/3 "2023-09-23T20:15:45Z")

</div>

Might be worth trying something like Fastgen + Supabase, otherwise you’d have to make your own logic for this at the moment.

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 23, 2023, 9:12pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/4 "2023-09-23T21:12:39Z")

</div>

Thanks for the suggestion. I’ll have to look into both.

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 23, 2023, 9:14pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/5 "2023-09-23T21:14:16Z")

</div>

Bummer. I’m surprised a no/low code platform wouldn’t be ready to support a SAAS application. This might be out of my capabilities and end my weweb application right in its tracks.

---

<div class="post-metadata">

**Author:** ![AJAW](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@AJAW](https://community.weweb.io/u/AJAW)\
**Post date:** [September 23, 2023, 10:41pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/6 "2023-09-23T22:41:53Z")

</div>

you can try supabase and use the wrapper functionality to essentially have access to your stripe database in subabase SQL. You should be able to gate off content by using row level security policies and possibly assigning roles to your users to then use weweb’s role based access control features.

Otherwise, in Xano its just a simple webhook from stripe \> xano after a valid subscription. You can then assign a role based on the subscription (or just checking the subscription in weweb and redirecting if invalid)

[![](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/df70e62f8d8153362e37ac37a728655d1b482989.jpeg "Secure Webhooks with Stripe") ](https://www.youtube.com/watch?v=VLDvBhmiXmg)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 24, 2023, 8:04am UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/7 "2023-09-24T08:04:41Z")

</div>

Using supabase you can mirror your Stripe api with a few lines of SQL, and then use it as if it was your tables.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [September 25, 2023, 3:08pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/8 "2023-09-25T15:08:49Z")

</div>

Hey @KnightVisionCreative 👋

Can you tell me more about your project?

How would you define the 20-50-100% of content? Would it be that users have access to 20% of the pages or 20% of an article on a single page for example?

For implementing Discord for authentication, I think Supabase would be easier than Xano because they have it right out of the box:

 ![CleanShot 2023-09-25 at 17.05.14@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c793236b8192e9d247bf85421a10c2b7da1ee5a0.png)

It’s still work though, you will need to read [Discord’s developer documentation](https://discord.com/developers/docs/intro) and [learn more about OAuth](https://youtu.be/pHkkD2FFOWM).

For implementing the subscription piece, we don’t have user docs or a video tutorial on this yet but we do have some users who have implemented it so I’m 100% sure it’s possible 🙂 How straightforward/easy, I’m not sure. Like the others said, it’s something you might consider doing [through your backend directly](https://supabase.com/docs/guides/database/extensions/wrappers/stripe).

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 26, 2023, 4:40am UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/9 "2023-09-26T04:40:30Z")

</div>

Hi @Joyce!

I’d like to build an interactive database similar to [https://www.dndbeyond.com/spells](https://www.dndbeyond.com/spells)

I plan to have the base search pages available to everyone, but if you go to a specific page, you would only have access to 20% of them on the free tier.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/1997d28ac281d8c16e355cb4c142fc039c72c3c2.jpeg)

For MVP I would be fine with a single role where everyone has to have a subscription in order to access and they get everything. The rest could be updated/rolled out later.

Discord authentication would be great as it is where a lot of my community already congregates, but it is not required.

If subscription capabilities require working with API calls without a guide, this, unfortunately, is probably where my journey with weweb ends. I saw the stripe integration and assumed we’d be able to access subscriptions.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/236fd79e8f752429ebed2fbd29ee48bd6350fba2.png)

Are SAAS applications not something that weweb is positioning itself to be able to do?

If you need more details from me, I’m happy to share. I found your interface much more intuitive than [bubble.io](http://bubble.io) and [softr.io](http://softr.io), but I’ll need to switch back if we’re missing subscription capabilities.

Talk soon!

-Brendan

---

<div class="post-metadata">

**Author:** ![FJP84](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FJP84](https://community.weweb.io/u/FJP84)\
**Post date:** [September 27, 2023, 8:11pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/10 "2023-09-27T20:11:39Z")

</div>

Do you know memberstack? I haven’t used it myself but read about it. People have used it in combination with Webflow.

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 28, 2023, 10:16pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/11 "2023-09-28T22:16:51Z")

</div>

I just sent them an email. Thank you for the suggestion!

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 28, 2023, 10:24pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/12 "2023-09-28T22:24:56Z")

</div>

What backend are you using?

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 28, 2023, 11:17pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/13 "2023-09-28T23:17:28Z")

</div>

I haven’t set one up yet for the authorization. I have been using Airtable as a placeholder for the content data at present, but have no qualms about changing to something else.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 28, 2023, 11:19pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/14 "2023-09-28T23:19:42Z")

</div>

With Supabase you can set up a Wrapper as described in [Stripe | Supabase Docs](https://supabase.com/docs/guides/database/extensions/wrappers/stripe)  
After that you can use your Stripe API as your Supabase tables, according to what I read there in the examples, Supabase plugin / updated Supabase plugin from @Alexis should be able to actually hit the API and UPDATE, DELETE and ADD stuff like Customers, and Subscriptions 🙂

 ![Screenshot 2023-09-29 at 01.21.43](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f91b2f1ef79a4767534ebc814177666fa86dc0b0.jpeg)

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 28, 2023, 11:53pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/15 "2023-09-28T23:53:58Z")

</div>

That sounds super interesting and potentially what I’m looking for. I’m not sure I understand enough of it to do anything at present, but since Supabase seems to also have native Discord Authentication as an option, that might be the place to start.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 28, 2023, 11:58pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/16 "2023-09-28T23:58:56Z")

</div>

It definitely has a learning curve, but feel free to post here your progress/questions and we’ll try to help you out 🙂 I’m researching it now, and it seems like it’s fairly simple to hit Stripe with these wrappers. You can even join your users with the subscriptions apparently, if you set it up well enough, so I think this might be the thing.

---

<div class="post-metadata">

**Author:** ![KnightVisionCreative](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/knightvisioncreative/32/5075_2.png) [@KnightVisionCreative](https://community.weweb.io/u/KnightVisionCreative)\
**Post date:** [September 29, 2023, 4:31pm UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/17 "2023-09-29T16:31:13Z")

</div>

Definitely feel intimidated. I’ll see what I can figure out.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [October 2, 2023, 9:37am UTC](https://community.weweb.io/t/how-do-i-set-up-subscription-gated-content/4544/18 "2023-10-02T09:37:56Z")

</div>

You’ve got this! 😉

Don’t hesitate to reach out along the way. We’ll do our best to help out
