In the stripe documentation, we have the option to pass ‘payment_behavior’ => ‘default_incomplete’, in order to create a subscription with the payment method.
In cashier we have a trial option but what if we don’t want to use trail then how can the subscription get created without a payment method?
$subscription = $user->newSubscription('default', $validated['priceId'])
->trialDays(14)->create();
This is my code, I would like to remove the
trailDays
option and add payment_behavior to default_incomplete.
2
Answers
You can remove
trialDays()
if you don’t want a trial and then pass the desired additional Stripe parameters in third argument as noted in the Laravel Cashier docs: https://laravel.com/docs/10.x/billing#additional-detailsTry
ignoreIncompletePayments
method withouttrialDays
.The status will be
default_incomplete
but if you invokesubscribed
method it will result false.