Looking for a guide for stripe subscription Laravel 8
Hey everyone! I'm looking for the simplest guide for integrating Stripe Subscription also using Laravel Cashier. Any suggestions?
@Sergiu17 That's not a simple guide for me. Anyway, thanks for your suggestion!
@crypt.001111101 https://laracasts.com/series/billing-with-laravel-cashier check this then, it's a copy paste process
and here's source code: https://github.com/laracasts/lc-cashier-stripe-example
@Sergiu17 Okay I need some help. I'm trying to understand what are the steps of creating this subscription. So first of all I'm creating a Stripe Customer with
$user = Auth::user();
$user->createAsStripeCustomer();
or if there is already an existing customer I'm retrieving its data with
$user = Cashier::findBillable(Auth::user()->stripe_id);
After that I continue with creating a Setup Intent with:
$intent = auth()->user()->createSetupIntent();
And actually on which point of payment progress I should do this? Is it the beginning of everything or what? Also I need to assign a payment method to the user before payment. Where do I see a full list of available payment methods of Stripe? I also saw that I need to store these payment methods with the identificator that Stripe has for each of them. After all of that what payment form do I use? Do I use the portal they provide or I use their elements builder (I prefer the elements builder specifically the card one)? And when everything is done how do I create all the logic if the user has canceled/expired/valid subscription so I can decide what to do with the specific user?
@Sergiu17 Do you have any idea if Laravel Cashier already built a relationship between Users table and Subscriptions table so I can use it as a condition if the specific logged user has subscription or not?
Please or to participate in this conversation.