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

mrad's avatar
Level 1

Always free plan (no trial), but with possibility to subscribe to paid plans

I have the following in booted() in SparkServiceProvider.php


    public function booted()
    {

        Spark::freeTeamPlan()
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Fourth feature'
            ]);

        Spark::teamPlan('Bronce', 'provider-id-1')
            ->price(10)
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Forth feature'
            ]);

        Spark::teamPlan('Silver', 'provider-id-2')
            ->price(25)
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Forth feature'
            ]);

        Spark::teamPlan('Gold', 'provider-id-3')
            ->price(50)
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Forth feature'
            ]);
    }

then the user will have the possibility to register for either the free or one of the paid plans. If he chooses the free plan, he can not upgrade to a paid plan in the future

If instead I have the following:

    public function booted()
    {
        Spark::useStripe()->noCardUpFront()->teamTrialDays(10);

        Spark::freeTeamPlan()
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Fourth feature'
            ]);

        Spark::teamPlan('Bronce', 'provider-id-1')
            ->price(10)
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Forth feature'
            ]);

        Spark::teamPlan('Silver', 'provider-id-2')
            ->price(25)
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Forth feature'
            ]);

        Spark::teamPlan('Gold', 'provider-id-3')
            ->price(50)
            ->features([
                'First feature', 'Second feature', 'Third feature', 'Forth feature'
            ]);
    }

then the free plan is only for 10 days.

But if I want to have a free plan for always and the possibility to upgrade to a paid plan, what will I have to code?

0 likes
11 replies
themasterpage's avatar

Yes, I have the same scenario to implement as well. Anything?

gregghoush's avatar

I will need this same thing coming up soon. Anyone have a solution to this?

ZetecVan's avatar

This is something I'll need to do in the future. I'm coding my app and haven't given thus much thought as I assumed it would be possible.

Why can't a user upgrade to a paid plan if they choose the free initially?

jpeterson579's avatar

Cant you just do

Spark::useStripe()->noCardUpFront()
2 likes
bencarlson's avatar

Thanks jpeterson579! That sort of fixed it for me... Here's my example:

public function booted()
{
    Spark::useStripe()->noCardUpFront();

    Spark::freePlan()
        ->features([
            'First', 'Second', 'Third'
        ]);

    Spark::plan('Monthly', '3month')
        ->price(3)
        ->features([
            'First', 'Second', 'Third'
        ]);

    Spark::plan('Annual', '19year')
        ->price(19)
        ->yearly()
        ->features([
            'First', 'Second', 'Third'
        ]);
}

Now in my "subscriptions" section it displays: "You are not subscribed to a plan. Choose from the plans below to get started."

marcgaumont's avatar

@bencarlson Sorry for digging this up, I just installed spark. I'm trying to remove the trial period completely on the free plan... so that users sign up and the message that says the number of days left is not displayed. I think your example is very similar or identical... Thing is I paste your code in and I still get a trial period even if none are mentioned and Spark::useStripe()->noCardUpFront(); is used... theres no combination where a user is asked to sign up, free without trial... any way around this ?

The You are not subscribed to a plan. Choose from the plans below to get started. NEVER shows,...

The ONLY way i manage to remove the trial is using :

// Spark::useStripe()->noCardUpFront()->trialDays(-1);

This sorta works and removes the message backend but on register there are no plans listed... just subscription packages to upgrade... any ideas ?

danwah's avatar

@marcgaumont and to anyone else interested. I had a similar problem to yourself and solved it y doing the following:

Bearing in mind I'm using the latest version of Spark - v9.0

In SparkServiceProvider I have this setup:

Spark::trialDays(-1);

Spark::freePlan()
    ->features([
        'First', 'Second', 'Third'
    ]);

Spark::plan('Basic', 'provider-id-1')
    ->price(10)
    ->features([
        'First', 'Second', 'Third'
    ]);

What this gives you is:

  • An option between the free plan and a monthly 'Basic' plan with a form for CC details on the register page
  • IF you've chosen the Free Plan - Hides the subscription section in the user drop down menu, it only shows settings.
  • Subscription settings available from the left nav menu - And it doesn't show the trial message: "You are currently within your free trial period. Your trial will expire on :date."

Hope this helps!

2 likes
aullah's avatar

This is an okay workaround, however ideally you'd want the free option to be visible in your 'Subscriptions' page; incase anyone would want to downgrade in the future without requiring to contact you for support. (This is more of a Laravel Spark issue rather than the suggested workaround.)

Also using this workaround redirects a user to the subscription page immediately after each login, which is not ideal. Overall, this may still be the best solution available unfortunately.

I'm currently working to configure Spark to meet these requirements too. Just upgraded from Spark v9 to v11 today.

Please or to participate in this conversation.