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

farshadf's avatar

laravel cashier stripe does not fill end_at column after payment

i am using laravel cashier for subscription system , i implemented the payment like this :

public function orderPost(Request $request)
    {

        $user = auth()->user();
        $input = $request->all();
        $token =  $request->stripeToken;
        $paymentMethod = $request->paymentMethod;



        $newSubscription = $user->newSubscription('default ', 'price_1IFyPsB9YMR57in7UrNtRb9G')->create($request->payment_method, ['email' => $user->email]);

        dd($newSubscription);

and my view is like below :

       <form action="{{route('order-post')}}" id="payment-form" method="post">
                            @csrf
{{--                        {!! Form::open(['url' => route('order-post'), 'data-parsley-validate', 'id' => 'payment-form']) !!}--}}
                        @if ($message = Session::get('success'))
                            <div class="alert alert-success alert-block">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                <strong>{{ $message }}</strong>
                            </div>
                        @endif
                        <div class="form-group" id="product-group">
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <div id="card-element"></div>
                                </div>
                            </div>

                        </div>
                        <div class="form-group">
                            <button id="card-button" class="btn btn-lg btn-block btn-success btn-order">Place order !</button>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <span class="payment-errors" id="card-errors" style="color: red;margin-top:10px;"></span>
                            </div>
                        </div>
                        </form>

now what happens after i receive the dd the database is filled with data and stripe shows that i got this plan but i have one problem and thats like image below that the field ends_at has null value : enter image description here

now i want to know how can i detect that when user account expires and if a user have active subscription or not . thanks .

0 likes
3 replies
martinbean's avatar
Level 80

@farshadf Why would a brand new subscription have an end date? It’s a new subscription. The user’s just subscribed.

There is no end date until a user decides they want to cancel. That’s the entire point of a subscription: it recurs until you or the user cancels it.

1 like
farshadf's avatar

@martinbean you are right i saw doc again and saw i have to check the active subsction with subscribedToPlan() thanks

1 like

Please or to participate in this conversation.