Table of Contents
Billabletrait applied to our
Usermodel, 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.