Xano + WeWeb + Stripe Subsciptions

I am creating a SaaS app with WeWeb and Xano. I want users to be able to sign up for a subsciption which will give them access to certain features or pages when they are logged in.

Can anyone give me a high level overview of how to actually do this, or point me in the direction of a tutorial that explains how to do this?

My high level…

Most of the work here is in stripe. You can set up subscriptions, pricing etc… in stripe and then get the end points for each tier of subscription.

Then in weWeb, you just build a price page or in app call to action, that passes the subscription id the user selected.

Once a subscription goes through in stripe, it will return a success message, not sure if it is a JSON object, but I guess it is.

This can be used to update your Xano DB, against the user or Org, you could have a column that is set to the plan the user is on, and a few other columns to store the info stripe returns on success, how much they paid… etc…

You can handle returns, stoppages etc… via the stripe API calls.

What I would say is… it is not as scary as it sounds, taking payments is a bit scary… but you can test with stripe test cards to be sure it is all working (included in you account) AND there are lots of general tutorials on integrating stripe, you can follow them but just swap out the steps with steps in weWeb and Xano.

best of luck

That is very helpful. The one thing I still am unsure about is how do I update the xano status of a user when the subscription expires or renews?

Maybe this will become evident as I do it, but I would feel much better knowing this is possible ahead of time.

Stripe has great APIs, good documentation and there are many tutorials so dont worry, if you get lost at any point, you can be assured there are answers out there :slight_smile:

You can integrate with Stripe in lots of ways, but the highlevel is that when a users subscription expires or auto renews, this is an event in stripe that can be triggered by the API. The API returns a success or fail object, you use that response to update your DB and weWeb app interface.

In your DB you could track renewDate, you could track subscriptionEndDate… or any other stripe data and then when the user clicks on a button in your app to renew, the API you use can return a success object (that they actually paid) that you can use to update those fields in your DB.

Stripe has webhooks for all of these events that can be used to keep your db in sync. This would be recommended over polling with an HTTP request from your backend. Webhooks are basically API requests from Stripe to your DB.

1 Like

This :point_up:

Stripe webhooks are great for this! They’re realtime, and no need for you to have recurring tasks to update statuses.