I need clarification on cashier subscription and changing subscription
Hi community, in using laravel cashier,
I have read the documentation and some tutorials but still need some understanding. In creating a subscription, I use payment intents. and then able to charge which reflects in the stipe dashboard. Below is my code. Does this mean every month, the user will automatically be charged for the subscription? eg:
$paymentMethod = $request->paymentMethod;
$user->newSubscription($plan->stripe_plan, $plan->stripe_plan)->create($paymentMethod, [
'email' => $user->email,
]);
Also, How do I change the subscription using 'swap' like below?:
$user->subscription('main')->swap($plan->stripe_plan);
If the user is upgrading or downgrading, do I have to charge the user as in step one above and then do the swap?
Also, Should the main be the new subscription name or the old subscription name?
Also, Every registered user is automatically assigned to the 'Introductory" plan which is free. Do I have to create a stripe customer when signing up and when a user is upgrading, then I use the customer to charge? How do I go about it?
Please or to participate in this conversation.