Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

invisibleink's avatar

Disabling Subscriptions

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;

0 likes
6 replies
jekinney's avatar

Set up free plan or plans. As spark is a subscription based boilerplate not sure if that part can be left out.

sweijdt's avatar

I want to know this too. I want to use a lot of features from spark. Except the subscription and api part.

99 dollars is a very good price even if you're only interested in some of the features. But is it possible?

EventFellows's avatar

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.

EventFellows's avatar

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.

1 like
tptompkins's avatar

@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.

EventFellows's avatar

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.

Please or to participate in this conversation.