Тёмный
No video :(

Creating an order in the database with Stripe webhooks - React and Node.js E-Commerce 

Chaoo Charles
Подписаться 23 тыс.
Просмотров 35 тыс.
50% 1

Watch Part 1 - Stripe Payment: • Stripe Payment Integra...
Full Course: • Complete Shopping Cart...
Sections:
00:00 - intro
01:08 - install stripe CLI
05:07 - create webhook endpoint
15:50 - handling checkout success event
25:45 - create order model
31:26 - save order to database
✨ Join My Discord Server
/ discord
Donate 🤑
📍Donate with PayPal: www.paypal.com...
SUPPORT MY CHANNEL
📍SUBSCRIBE: / @chaoocharles
📍Become a Channel Member: / @chaoocharles
📍Join My Fun Channel: / @chaaoo
GET IN TOUCH:
📍 Twitter: / chaoocharles
Disclaimer: This video is not sponsored

Опубликовано:

 

15 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@teetanrobotics5363
@teetanrobotics5363 2 года назад
bro i see the effort you put in with the terminal, powershell, scoop, etc. I used to do this a long time back. Then I switched to Ubuntu (Linux distro). Trust me life is so much easier and would recommend you too. You won't regret it.
@ChaooCharles
@ChaooCharles 2 года назад
Thanks bro
@supravatsarkar5866
@supravatsarkar5866 Год назад
Thank you so much bro for your effort. I am trying implement stripe payment with webhooks through stripe doc but I not properly understand that in last two day. Now your video clear my concept. ❤from India.
@JulioSCayo
@JulioSCayo 7 месяцев назад
Thank you very much bro, I had a lot of questions about how to handle the customers and orders data after the payment but didn't find out anywhere with an explanation of that process, you left it very clear for me :)
@toshitsingh7270
@toshitsingh7270 Год назад
Thank you soo much the videos, I was looking for integrating stripe to a website, it helped a lot. Quick tip for viewers it's ok for the tution purpose but in production check the product price in server side.
@developedbynick
@developedbynick 2 года назад
The error occurred because you placed the route handler after calling a body parsing middleware. So to fix that, just cut it and paste it before calling a body parser.
@jacerchetoui709
@jacerchetoui709 Год назад
Thank you so much, you saved me!
@bilalahmed4455
@bilalahmed4455 Год назад
@@jacerchetoui709 where? tell me
@jeremyacton6378
@jeremyacton6378 2 месяца назад
you hero. I've been stuck for hours on this issue. you saved me!
@chrisqiuu
@chrisqiuu Год назад
Thank you again sir! very helpful tutorial, it's a miracle I came right into your videos. You are a great teacher!
@abrehamtilahun4820
@abrehamtilahun4820 5 месяцев назад
Thank you, you help me a lot. please keep going.
@SurajSingh-lu8ei
@SurajSingh-lu8ei Год назад
for an entire video I thought my right earphone is gone, then suddenly music played, LOL :)
@michaelrose1761
@michaelrose1761 28 дней назад
You are good bro. It is helpful thanks.
@UddhikaIshara
@UddhikaIshara 10 месяцев назад
Thank you very much! This was so helpful! Easy to understand! Thank you very much again! ❣
@Kris-to7vh
@Kris-to7vh Год назад
15:20 I was able to verify the endpoint by adding these lines: app.use('/api/stripe/webhook', express.raw({ type: 'application/json' })); //
@Manuevaral
@Manuevaral 10 месяцев назад
Exactly that's what i wantedddddddd....
@neeraj_minhas
@neeraj_minhas 11 месяцев назад
Thank you for new earphones , After listening to your video i found one side of it not working , purchased new ❤ thanks
@feevah-fvwrldprod8792
@feevah-fvwrldprod8792 Год назад
You are a really good teacher. Thank you❤
@vishwachandral5576
@vishwachandral5576 Год назад
could you please implement a frontend for the user order details
@ankitanand3324
@ankitanand3324 Год назад
Thank you for the content. I hope to see more amazing contents like this.
@birdboy4774
@birdboy4774 2 года назад
Quick tip you should make your microphone on both left and right channels instead of just the left
@lennoxcharles6092
@lennoxcharles6092 4 месяца назад
Thanks for the Tutorial Charles
@barackouma2552
@barackouma2552 9 месяцев назад
you can try modifying this const body = request.rawBody.toString(); instead of parsing the whole request body then call the body in the event function instaed of req.body
@informationhub7199
@informationhub7199 6 месяцев назад
thanks for your content bro..iam happy and subscribed
@user-ex8tg3ii5l
@user-ex8tg3ii5l Год назад
Help please I have a problem with constructEvent it shows me an error No signatures found that match the expected signature for the payload. Are you forwarding the raw request body you received from Stripe? And I collected express.raw({ type: '*/*' })
@umairyatoo8490
@umairyatoo8490 2 года назад
I have to integrate stripe in my application. Apart from the "checkout.session.completed" event, is there any other key event that I must need to handle and could you please elaborate the events a bit more, like which one is a must to handle.
@Dhanushsaji
@Dhanushsaji Год назад
The size of the metadata is a problem..do you have any alternatives?
@devcaand
@devcaand Год назад
You can create a pending transaction on your backend, you need to specify transaction 'id' it could be uuid() and pass as many items as you want in there, really the limit at this point is your db. Then, you pass that 'transaction id' into your payment intent as metadata. When you receive your webhook with "checkout.session.completed", you parse that metadata and grab your transaction id from it. Then, run a function to update that transaction on your backend from pending to success. Likewise in case of error, you can delete that transaction or write a script which will be deleting all pending transactions once they are 1day old or something. That way you can avoid transferring cart items back and forth and dealing with 500 character limit.
@vishalsolanki9234
@vishalsolanki9234 Год назад
if my stripe listener not in running mode at the the web hook endpoint run automatically by stripe?
@devsuthar6795
@devsuthar6795 4 месяца назад
bro Thank you so much... Very good Detailed video and Easy To Understand 🫡
@josephuzuegbu7431
@josephuzuegbu7431 Год назад
This is the best tutorial. Can i build a fintech app using stripe apis?
@SonThai-cx6jt
@SonThai-cx6jt 4 месяца назад
Thank you so much
@alanye7542
@alanye7542 Год назад
Thank you so much!!!
@katrinarossi1381
@katrinarossi1381 10 месяцев назад
Thank you for this video! I do have a question- how do we create orders from customers who are not logged in? Then we won't have a userId to pass to create a customer through Stripe. Thanks!
@listingmaster15
@listingmaster15 9 месяцев назад
So before checkout redirect user to login page so then you will always have user I'd
@tutoring-academy
@tutoring-academy Год назад
Hello, Thanks for amazing tutorial. Do you have github link for this project.?
@big-jo89
@big-jo89 2 года назад
about the Webhook error i found this to be working for me : const payload = req.body; const payloadString = JSON.stringify(payload, null, 2); const header = stripe.webhooks.generateTestHeaderString({ payload: payloadString, secret: ENDPOINT_SECRET as string, }); let event; try { event = stripe.webhooks.constructEvent(payloadString, header, ENDPOINT_SECRET as string); console.log(`Webhook Verified: `, event); } catch (err) { console.log(`Webhook Error: ${(err as Error).message}`); res.status(400).send(`Webhook Error: ${(err as Error).message}`); return; } // Handle event types ....
@ChaooCharles
@ChaooCharles 2 года назад
Hey, thank you for sharing
@big-jo89
@big-jo89 2 года назад
@@ChaooCharles keep up the good work, you're doing great man
@DividendCompass
@DividendCompass Год назад
Nice one! This solved it for me, thank you
@yaaaayeet745
@yaaaayeet745 8 месяцев назад
thanks mate!
@harshiilllll
@harshiilllll Год назад
i get error if i add multiple products in my cart, error is that we can not add more than 500 characters in metadata, how do i handle that?
@ChaooCharles
@ChaooCharles Год назад
Hey, proceed with the course the solutions to metadata I included in the React Dashboard video..
@ChaooCharles
@ChaooCharles Год назад
Currently you can set the cart to be an empty array and order model at products you set it to just array without specifying the properties..
@harshiilllll
@harshiilllll Год назад
@@ChaooCharles cool! i'll check that video
@joeyywill1234
@joeyywill1234 2 года назад
greate video again!
@ChaooCharles
@ChaooCharles 2 года назад
Thank you!
@toothless.tarantula
@toothless.tarantula Год назад
Nice video, be aware that stripe metadata key value object has per key size limit, could be an issue for large amount of cart items use case.
@Dhanushsaji
@Dhanushsaji Год назад
Do you find any alternatives?
@funnysphere4669
@funnysphere4669 11 месяцев назад
Thanks
@Seedley
@Seedley Год назад
Can you post the source code?
@dharmeshgohil9375
@dharmeshgohil9375 2 года назад
Expecting login using gmail, facebook, Instagram using react
@engineermaxwel6732
@engineermaxwel6732 2 года назад
I have question this endpoint secret in webhook should be inside .env or its okay
@devcaand
@devcaand Год назад
if you deploying it live then better to keep it in the env. If you just playing around in your sandbox, do whatever you want
@narayanthapa6609
@narayanthapa6609 Год назад
it throws error when i pass cartItems inside metadata while creating a customer.
@ChaooCharles
@ChaooCharles Год назад
Yeah, pass an empty array.. in the next videos we are using an alternative
@lucavera4737
@lucavera4737 Год назад
TE AMO
@LordR123
@LordR123 Год назад
Someone have idea how to show customers orders?
@natnael-oqp5082
@natnael-oqp5082 2 года назад
mern stack app with typeScript nextjs graphql
@harshitpahuja7186
@harshitpahuja7186 Год назад
i am getting paymentIntentId null
@spacehuru1023
@spacehuru1023 Год назад
is there a way to collect global payments from Kenya as we cannot access stripe here?
@cowboyuniverse7258
@cowboyuniverse7258 Год назад
Do you not see? Read it “For local dev” …
@NCS8331
@NCS8331 6 месяцев назад
Do you all hear any sound?
@simmypayyappillyvarghese4801
I got the issue resolved by using the middleware app.use('/webhook', express.raw({type: '*/*'})) and removed the middleware from the post router
@KristijanStosic
@KristijanStosic 2 года назад
Hi, I need some help with stripe payment, can I contact you privately somehow?
Далее
Accept a payment with the PaymentElement using Node.js
24:16
Вся Правда Про Хазяевов !
41:02
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Просмотров 1,5 млн
Stripe Webhooks - The Ultimate Guide
29:04
Просмотров 4,9 тыс.
How WebHook works | System Design
7:43
Просмотров 80 тыс.
How To Accept Payments With Stripe
23:05
Просмотров 271 тыс.
PROOF JavaScript is a Multi-Threaded language
8:21
Просмотров 273 тыс.
Set up Stripe Webhooks with React and Express
7:09
Просмотров 24 тыс.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58