Laravel Cashier makes this incredibly easy to create subscriptions. Since we already have the
Billable trait applied to our
User model, we have access to some cool methods. Here's how we would create the user's subscription:
$user->newSubscription('main', 'bronze')->create($token, [ // any extra info we want to pass to stripe. see https://stripe.com/docs/api#create_customer 'email' => $user->email ]);
Visit the Stripe API docs to see more of what you can pass through to the user's Stripe record.