I followed this tutorial step by step: https://appdividend.com/2018/12/05/laravel-stripe-payment-gateway-integration-tutorial-with-example/
However, when I go to tes
Maybe im late but you dont always need to setup the payment intent. i was able to do the following
$user = new User();
$user->fill($payload);
$user->createAsStripeCustomer([
'name' => $user->fullname,
]);
$user->updateDefaultPaymentMethod($data->stripeToken);
$user->newSubscription(env('STRIPE_SUBSCRIPTION_NAME'), env('STRIPE_PLAN_ID'))
->create(null, [
'name' => $this->fullname,
'email' => $this->email,
]) // may not be required as we already do this above;
stripeToken is the token returned when using stripe.createPaymentMethod. One thing of note is that i no longer have to specify a payment method when creating a subscription. Also in my case i had to collect the credit card during user registration. I only start the subscription when the user verifies their email.
The steps are
I really dislike the stripe docs. Too many breaking changes and i feel its incomplete as they are more than one way to do things that arent being documented
.