I’ve built a saas app, now i am starting to dive into adding the subscription aspect of it.
There is a free plan that limits the use, and then one paid plan that offers unlimited use.
In the user Thing, does it make sense to just have a “payed” yes/no field that controls permissions and such? when payment is confirmed switch user to payed. etc.
Does stripe handle refunds? do i need to create functionality for that?
does stripe automatically charge people every month? if so, what functionality do i need to add to my app to make sure people who are subscribed stay subscribed, and those who cancel are cancelled?
i know i am missing a lot of things here. If anyone can offer a high level view of things i need to think about when dealing with subscriptions, i would greatly appreciate it.
Let me get back to you with this. I actually direct messaged someone who gave me some info, but i have yet to implement it myself. I’ll fill you in fully once i finish it, hopefully before end of month
Sounds like @ben already figured out the answers, but I’ll just answer the original questions asked for anyone else:
(Go to Stripe’s Dashboard! Once you play around with it for a bit, you’ll probably find everything you need.)
You don’t need a user field to determine if they are subscribed or not. Once you’ve enabled the Stripe plugin, you’ll be able to reference “Stripe Customer Subscription Status”. (Towards the bottom, near Current Date/Time, etc.) It uses these values: https://stripe.com/docs/api#subscription_object-status. From there, you’ll be able to reference whether or not the subscription is active. Note: canceled and unpaid are not used as statues in Bubble. If a subscription is cancelled, the value of “status” would just be empty.
Refunds can be handled through the Stripe Dashboard (go check it out, there’s actually a lot of cool settings in Stripe’s dashboard!)
Stripe handles recurring payments once you’ve set up a plan in the dashboard. Cancelling is as easy as adding a button to your app and running a workflow that cancels the current user’s subscription.
So i’m implementing this now, and all is looking good, except one thing so far.
I have 2 plans, one for 10$, one for 20$
I subscribed a test user to the 10$ plan, and in the stripe test dashboard, 10$ of “total volume” was logged. Great.
Then, when i clicked the upgrade to the $20 plan option, it upgraded the user to the correct $20 plan, but the extra $10 was not logged into stripes total volume. In payments, only the first, 10$ is listed.
Now, i think this is because initially, i got the stripe checkout screen, where i entered my card. however when i pressed upgrade to the $20, no checkout screen popped up, but the user was successfully upgraded to that $20 level.
Any ideas what is happening here? or how i can force the checkout screen to show up?
So I’m not in front of a Bubble editor to confirm this, but I’m going to guess that this is because you’re in the middle of a billing cycle when you upgraded. I’m thinking that because of this, it’s changing the plan that you are on, but not charging you until your next billing date if the cycles are the same. (eg. Both subscriptions are 30 day subscriptions)
What you could probably do is that when a user goes to upgrade, you can unsubscribe them, manually charge them the difference in plans, and then subscribe them to a new plan. The new plan would probably need to have a free trial at the beginning so that the user doesn’t get double charged.
You may need to have 2-3 iterations of the same plan to cover all of the possibilities.
I’ll take a look later tonight to double check this!
Hola, me gustaria saber si encontraste solucion a tu problema, es que estoy intentendo crear una pasarela de pago implementando stripe pero no encuentro documentacion, si me pudieras ayudar seria estupendo