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

Ronster's avatar

Trials not given

Hi,

I have a very urgent issue regarding Trials. People subscribing to my app never get the 14 days trials i defined in spark and on the plans.

This has cost me a lot of customers and money that had to be refunded. Does anybody else has this problem? or does somebody knows a solution?

Thanks Ronnie

0 likes
6 replies
EventFellows's avatar

The trials are awarded according to the setting on Stripe - not the data you enter in SparkServiceProvider (I suppose it is the same for BrainTree).

  • whatever you set in Spark only is for info purposes for the user ( goes without saying that it should be identical...)
  • same is true for prices and trial end dates (and probaly a few more properties, too).

E.g. if Stripe data says that the trial ends tomorrow and your database says next week (e.g. if you manually changed for testing) - it will end tomorrow.

EventFellows's avatar

If above comment does not apply to your setup, you might also try if you find a difference beween the general setting like

Spark::useStripe()->noCardUpFront()->trialDays(10);

versus setting it on the individual plans

->tiralDays(10)
jpeterson579's avatar

I am seeing this same issue too (I am running in test mode on stripe). I have a 30 day free trial set up in stripe. However when I register a new account and then make select the plan and enter in the testing credit card info, it is billed right away...

So do I need to define this in my spark files too, in addition to on the stripe dashboard?

Ronster's avatar

The problem with my issue was that I was loading the plans from database.

I explicitly had to cast the Db value for trial days into an integer. same as for price.

jpeterson579's avatar

I am still having a ton of trouble with this. Tried both ways on individual plans and on general settings like shown above...

Also noticed that in my users table when I enter credit info and subscribe to a plan the trial_ends_at column is made null...

SparkServicesProvider.php

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

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

    Spark::plan('Monthly', 'spark-monthly-1')
        ->trialDays(30)
    ->price(10)
        ->features([
            'First', 'Second', 'Third'
        ]);
    
    Spark::plan('Annual', 'spark-annual-1')
        ->trialDays(30)
    ->price(90)
        ->yearly()
        ->features([
            'First', 'Second', 'Third'
        ]);
}
EventFellows's avatar

Are your stripe webhopks firing with a success status? You can check that in stripe dashboard.

Also what comes to mind: you have setup your code with 'noCardUpfront()' which means you should not be asked for credit card details on signup.

How can it immeciately charge a card then, if there is mo card entered...?

Please or to participate in this conversation.