I'm trying to wrap my head around the subscription process and what happens to a user's plan in the following scenario:
A FREE plan is configured
One or more paid plans are configured
All plans have trial days set to 0 (zero)
The user registers for an account and is automatically on the FREE plan
The user visits the Settings -> Subscriptions section, selects a PAID plan, and enters their credit card details to subscribe to the plan
Later the user clicks to cancel their paid plan and Spark displays a message like:
You have cancelled your subscription to the Essentials (Monthly) plan.
The benefits of your subscription will continue until your current billing period ends on September 24th, 2016.
Resume buttons are also displayed next to each of the paid plans so that the user can resume their subscription.
In the above scenario, what happens after September 24th, 2016? Will the user automatically go back on the FREE plan? At first glance, it appears that the Resume buttons will stay and the last plan that the user was subscribed to will remain assigned to the user but in an "inactive" state. If not, is there a process that will automatically remove the inactive plan from the user?
To the best of my knowledge, it will behave as you've suggested. In that the user will stay on their current plan, but with it disabled.
Best workaround I can think is a daily(?) task that is run that looks for accounts that have expired, and sets them to the free plan, and emails the account owner to let them know what has happened.
Thanks guys. All those sound like very workable ideas. However, I'm still not exactly sure what route I should go because I'm not entirely sure what is supposed to happen after a subscription ends. Does the subscription record remain inside the subscriptions table or does that get removed by a Spark process? From looking at the SubscriptionCancelled event handler, it appears that the only thing Spark does is set the current_billing_plan to null on the users table and doesn't do anything with the actual subscription record.
It's difficult to simulate this with Stripe because I'm running Homestead so Stripe isn't able to hit any of the normal callbacks for things like when a user cancels a subscription. Maybe I need to ditch Homestead and try getting Valet up and running.