Hey everyone, I was hoping to get some feedback / ideas on how I would add trial functionality to user accounts. I don't currently require credit cards for the signup, so it wouldn't be as simple as creating a Stripe customer and handling the trial on that side I don't think.
One idea I was thinking of was to create a lambda function that would run every night and deactivate premium features from all accounts that have expiring trials, but I'm not sure that's the most effective way to handle trials since technically some people may not get the full 7 day trial depending on the time of day they signed up.
I would love ideas or feedback from anyone who has tackled something similar before!
With the stripe SDK you can create a "customer" and "subscription" with a trial period (say 7 days). You don't need card details for that step.
I do something similar:
Ah awesome, that sounds like that approach would work well. I guess the only thing I could see is you may end up with a ton of Stripe customers who have never paid, do you do a manual cleanup of that every now and then?
Depends on whether you think they'll ever come back to pay... Either way for me I treat no subscription the same as a trialing subscription. That way when you delete old customers in Stripe they'll just be reset to trialing
This comment was deleted a year ago.
Yeah this is correct. What I described above is the MVP of a stripe integration
I have a subscription model and automatically create non-recurring free subscription on account activation 😁 so then users buy the real subscription or the free one just expires. Super easy to do with one table inheritance in Rails 👍🏻
There's an article sitting in my drafts folder in which I describe this exact scenario with Stripe; few things to note;
Some of the information I store upon signup is related to the end date of the trial, information retrieved from the API will always reflect this in the response.
Let me know what topics you'd like more information about.
This comment was deleted a year ago.