The tutorial demonstrates setting up Stripe webhooks for local development using the Stripe CLI. The developer configures endpoint URLs, authenticates the CLI, and tests the payment flow end-to-end, confirming successful event processing and reservation status updates through Postman and local logs.
Length 6:11
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #stripe #webhooks #cli #backend #integration #payments #testing #api #development
0:00 All right, so in this lecture, we're finally ready to start setting up 0:03 our 0:03 webhooks for real now that we have our controller set up in 0:07 payments and the event 0:11 connection set up to reservations. 0:14 So inside of our Stripe dashboard, we can look for the 0:18 webhooks inside of global search. 0:20 And you can see here we have the ability to add a 0:24 destination. Now, this is what you would do in production, right? 0:27 Once you've deployed your application and you have a publicly available 0:31 URL, you'll click on this button to configure 0:34 the destination. 0:35 Go ahead and configure the events you wanna listen for. 0:38 In this case, you could select all, or in our case, we know we just want the 0:42 checkout.session.completed 0:49 and checkout session expired events. 0:51 These are the only ones that we actually care about. 0:54 Click on Continue Webhook Endpoint, and here, simply 0:58 go ahead and now add your endpoint URL. 1:00 Now, this would be where you've decided to 1:03 deploy your application 1:04 to in production in this course, whether that's AWS or Google 1:08 Cloud. You'll enter in your endpoint here and the 1:12 appropriate path. For now, we wanna test with a local listener. 1:16 So you can see here we have the ability to now download the Stripe 1:20 CLI and log in with our Stripe account, and this will 1:24 allow us to set up a local webhook listener where we 1:28 can forward events that happen in the sandbox to 1:32 our backend webhook to test it out, which makes this extremely 1:36 useful. So our first step here is make sure you've downloaded the Stripe 1:39 CLI. I'll leave a link below for these docs. 1:42 Simply click Install, 1:45 and you'll scroll down to see the instructions here to install it with 1:48 NPM, 1:51 to install it globally. 1:53 So go ahead and make sure you have the CLI available.
The rest of the transcript is for members.
Sign in