richard's avatar
Level 21

Laravel Spark - Trial Days error

I have set 'trial_days' => 5, on spark.php but when I try to create a subscription, the trial period is not recognized (It goes ahead and charges the user as if the trial period does not exist). I have also set the trial days to 5 on the Sandbox Dashboard. What am I missing here?

I installed it using composer require laravel/cashier-paddle, run migrations, set up .env keys and created test plans then visited mydomain.com/billing..

0 likes
3 replies
Salvis's avatar

@richard have you figured this out? I'm experiencing the same issue with Spark + Stripe.

marktaylor's avatar

For Spark + Stripe, trial_days => 5 needs to be removed from the billable configuration and added to the individual plan configurations when collecting payment up front. This is shown in the Spark Stripe docs under "Requiring a Payment Method Up Front."

    'model' => User::class,
    // 'trial_days' => 5, Remove this configuration option...
    'plans' => [
        [
            'name' => 'Standard',
            'short_description' => '',
            'trial_days' => 5,  //  Add it on the plans instead
        ],
    ],
],

Please or to participate in this conversation.