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

jh's avatar
Level 1

Does Spark rely on fixed subscription plans?

Seems Spark heavily promotes the subscription plan business model. I'm looking to rewrite a CakePHP application from ages ago and it bills per X and per Y. A user can have four X's and six Y's, for example. Can Spark work with this or is the fixed plan paradigm tied in heavily?

0 likes
6 replies
jh's avatar
Level 1

Neat, so I suppose each user could have two subscriptions?

// Sign up form
Number of foos for this account? 5
Number of bars for this account? 8

// Create user
$user->subscription('foo')->updateQuantity(5);
$user->subscription('bar')->updateQuantity(8);

This looks fine as long as Spark can handle whatever I throw at Cashier. I just don't want to buy it and end up fighting with it to work how I want.

EventFellows's avatar

I believe a user can only have ONE Plan at a time (at least that is the standard setup) but within that plan there is a quantity attribute that somehow can be affecting the payment (I think I read an example somewhere where a plan's price would depend on the number of users on a team) - but as said, i have not tried it myself.

If not intended to affect the price you can add as many attributes as you like. https://laracasts.com/discuss/channels/spark/spark-plan-attributes

sdbruder's avatar

I've just got through Stripe API docs today and @EventFellows is right, there is a quantity associated with the plan enabling you to do simple (price x quantity), not even (fixed + price x quantity), nor your (price1 x qty1 + price2 x qty2).

spekkionu's avatar

Stripe subscriptions have a quantity but I believe Spark does not use it as it also supports Braintree which does not have the same functionality.

You would have to implement it on your own.

EventFellows's avatar

Just came accross the Cashier option to do single charges.

https://laravel.com/docs/5.2/billing#single-charges

could be a work-around for you to have a base subscription and then do the rest as single charges once a month.

It's as easy as $user->invoiceFor('One Time Fee', 500); and exists with and without extra invoice.

1 like

Please or to participate in this conversation.