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.
Let's take a look at how to handle webhooks in Stripe. Cashier provides some default functionality for all of the events that Stripe fires. You can make use of those defaults or customize them to fit your needs.
Now, let's switch over to the Paddle-specific implementation of Laravel Cashier. We'll focus on how to create and manage subscriptions, and check the subscription status of users.
Next up, we'll take a look at how to create products in Paddle, and trigger one-off charges in Cashier. We'll also discuss how to allow users to download their receipts for their transactions in Paddle.
Now, let's take a look at using Cashier with the Mollie payment provider. We'll prepare our plans, create a new subscription, utilize webhooks and configure some coupons.