A developer integrates Stripe into a NestJS backend application. The process includes configuring Stripe API keys, generating a checkout module with controllers and services, creating a checkout session endpoint, and validating the implementation using Postman to successfully generate a session ID for the checkout flow.
Length 15:11
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #nestjs #stripe #backend #payments #checkout #api #programming #web development
0:01 All right, so we're ready to get started with 0:03 implementing Stripe 0:04 payments into our application. So we're gonna use Stripe to be able 0:08 to actually click on a product and purchase it, and this is gonna 0:12 allow us to redirect to Stripe to their hosted checkout experience 0:16 to purchase the product with real currency, and then be 0:20 redirected back to our application after the purchase is complete. 0:24 So let's go ahead and get started with implementing the 0:26 Stripe payments first on 0:27 our NestJS backend, where we're gonna have to create a 0:31 checkout 0:32 session and then use that session to redirect the user on our 0:35 UI to the Stripe-hosted checkout. 0:39 Now, of course, before we get started with implementing 0:42 Stripe on our backend, 0:43 you're gonna need to make sure you sign up for a Stripe account. 0:46 So make sure you go to stripe.com and create an account. 0:49 It's gonna be completely free to get started and create an account and 0:53 integrate it into our applications. 0:56 So once you've created an account and you're on your dashboard, go into 1:00 this Developers link here, 1:03 and then in here, we're gonna see we have this API keys. 1:06 I wanna click on API keys, and you should see an option 1:10 here to get access to your publishable key as well as a 1:14 secret key. 1:17 So we need access to the secret key in order to authenticate our 1:20 NestJS backend to our Stripe client. 1:24 So make sure you go ahead and copy your Stripe secret key. 1:27 And now that we have the Stripe secret key, we're gonna go into our backend, 1:32 and in our .env, I'll add a new Stripe 1:36 secret key 1:37 and paste in the Stripe secret key. 1:40 So of course, we're adding this to our .env, 1:42 which should be inside of our 1:43 .gitignore file. So we're not committing these credentials
The rest of the transcript is for members.
Sign in