Using Stripe for Payments0:00
Okay, we can now continue with our checkout. Now, dealing with money, credit card transactions, all these kinds of things, are fairly complex and, for example, in order to store credit card information, you would need to have certain certifications. So, it doesn't really make sense for us to build this ourselves. The same goes for dealing with tax. Sales tax is extremely complicated across the world, and I prefer to use an external service so that they can help us deal with those things. So, in this example, we're going to use Stripe.
so that they can help us deal with those things. So, in this example, we're going to use Stripe. And if you're unfamiliar with Stripe, it's a payment provider, and it helps us to deal with transactions, subscriptions, all these kinds of things. It has a very good API, it's very developer-friendly. So, let's dive in and install the first dependencies that we need. So, you can head over to stripe.com, and you can sign up for free. Just enter your name, email, and password, and you'll get access to a developer account.
Preparing Keys and Webhooks1:03
Just enter your name, email, and password, and you'll get access to a developer account. That's all you need. And you're going to need a publishable key and a secret key further on when we install Laravel Cashier dependencies. So, make sure that you have these at hand. You want to install Stripe CLI. This makes it easier to deal with webhooks because when we have a transaction that was successful, we want to automatically mark this transaction as complete,
Installing Stripe CLI1:28
because when we have a transaction that was successful, we want to automatically mark this transaction as complete, and, of course, maybe send a confirmation email, all sorts of things. And in a local environment that's not exposed to the internet, you want to have a way to still receive these webhooks, and Stripe CLI allows you to do this. So, you can find all the instructions to install Stripe CLI below. It is available on Mac, Windows, it's available for your Homebrew, YUM apps.
It is available on Mac, Windows, it's available for your Homebrew, YUM apps. It's also available for your Docker. So, based on your operating system, choose what works for you, and we'll move on once you've completed the installation of these dependencies.
