Hello, does anyone know the best way to disable the subscription aspects of Spark?
Spark::useStripe()->noCardUpFront();
I used the code above and it seems to disable the UI and associated notifications, but not sure if there is anything else I am missing. It would be nice if the SparkServiceProvider had an option $usesBilling = false;
I believe @jekinney 's suggestion about using only one Spark::freePlan() should do the trick.
As a work-around you could always use the UserRegistered-event right after a user signed up to cancel the the user subscription within its trial phase.
One thing you might want to pay special attention to is the fact that the freePlan() technically is not a plan but the absence of a paid plan, which makes handling recurring events like the start of the next (free-)billing month a little more difficult.
@EventFellows Good point. So if I wanted to figure out when the start of the next free billing month is, what would be the recommended approach for doing that? I really wish free plans were recorded in the db and treated the same way as paid plans.
I agree, stripe does offer plans with a price of 0 and it would really be disireable to handle free plans exactly the same way as paid plans. Would life make so much easier. But so far I have not located the code that prevents free plans from being pushed to stripe - that would be the cleanest way, I guess.
My Setup works like this:
But I don't know if that is the recommended approach, but it works without any trouble so far:
creating a scheduled_renewals-table that contains user and next renewal date
set next renewal date for free plan on start of a free month
table get's checked and updated by a worker/cron job regularly
if a plan is changed the table entries for the changing user get cleared
I use Events and Listeners for it to decouple it
You might also need to handle the monthly renewals in a similar way if the user is on a paid yearly plan (afaik there is no stripe event available at the start of a new month if paid yearly). I am using the same table for that but set 11 renewal dates for the entire year on initial payment.succeeded.