How do I set up subscription gated content?

Hi!

I found this tutorial here: TUTORIAL – How to Setup Xano Authentication and Gate Content in WeWeb 🔐 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

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

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

1 Like

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

1 Like

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

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.

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)

1 Like

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

1 Like

Hey @KnightVisionCreative :wave:

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:

It’s still work though, you will need to read Discord’s developer documentation and learn more about OAuth.

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 :slight_smile: How straightforward/easy, I’m not sure. Like the others said, it’s something you might consider doing through your backend directly.

Hi @Joyce!

I’d like to build an interactive database similar to 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.

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.

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 and softr.io, but I’ll need to switch back if we’re missing subscription capabilities.

Talk soon!

-Brendan

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

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

What backend are you using?

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.

With Supabase you can set up a Wrapper as described in Stripe | Supabase Docs
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 :slight_smile:

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.

It definitely has a learning curve, but feel free to post here your progress/questions and we’ll try to help you out :slight_smile: 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.

1 Like

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

You’ve got this! :wink:

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