Laravel Cashier provides an expressive, fluent interface to Stripe's (and Paddle's) subscription billing services. In this series, we’ll take a look at the features of Cashier that will allow you to create the billing portion of a subscription-based SAAS app, including subscribing users to plans, authorizing with middleware, single charges, and invoices.
To begin, let's use Stripe Elements on the front-end to generate a secure form for our credit card information. We'll then pass that information over to our back-end Laravel app, which leverages Laravel Cashier to generate a subscription for that specific user.
In this lesson, we'll use a middleware to check the subscription status of our users. This allows us to prevent them from accessing unauthorized sections of our application.
In some cases, one-off charges are preferred over subscriptions. With that in mind, let's take a look at how we can accomplish this in Cashier.
Now, let's review how to generate invoices for our customers so they can retrieve them at any time from their dashboard.