Search code examples
laravelstripe-paymentslaravel-cashier

Is it possible to set user subsciption in-active after trail ends? Laravel cashier -stripe


Here is what I have done once user register,

   $user->createAsStripeCustomer();

        $user->newSubscription('main', $data['plan'])
            ->trialDays(21)
            ->create();

as it eventually, returns user subscribed true, and it will keep after trail period too, so I mean how I'll handle this situation after trail got ended? thanks any help would be really appreciated.!!


Solution

  • After the trial ends user will be on the grace period, and we can check easily if user trial is ended.

    $user->subscription('main')->onTrial()