Це відео не доступне.
Перепрошуємо.

Next.js 13 Full Stack E-commerce App #22 | Create new Order with Stripe Webhook

Поділитися
Вставка
  • Опубліковано 1 тра 2023
  • Git Repo Link:
    github.com/ghulamabbas2/buyit...
    Checkout my In-Depth Next.js Masterclass on Udemy Courses:
    www.udemy.com/course/nextjs-b...
    Next.js 13 Authentication with Next-Auth:
    • Next.js Authentication...
    ================================================================
    ⚙️ Gadgets I use for Recording:
    💻 Laptop - Macbook PRO M1 - 16/512
    amzn.to/4eUqrSe
    🎤 MIC - Samson Technologies Q2U USB/XLR Dynamic Microphone
    amzn.to/3W9Z4wl
    🖱️Mouse - Logitech G402 Gaming Mouse Hyperion Fury USB, Black
    amzn.to/3RY4xUy
    ⌨️ Keyboard - Logitech K380 Multi-Device Bluetooth Keyboard
    amzn.to/3RY4Fn0
    🖥️ Monitor - UltraSharp 24-Inch Screen Led-Lit Monitor (U2419H)
    amzn.to/4bxidN6
    ================================================================
    In this video, we'll continue building our full-stack e-commerce application with Next.js 13. We'll be focusing on creating a new order using Stripe webhook. We'll show you how to set up the webhook and handle incoming events from Stripe. You'll learn how to create a new order in our application's database when a successful payment is made.
    We'll also walk you through the code implementation, so you can follow along and learn how to integrate Stripe webhook with your Next.js application. By the end of this video, you'll have a better understanding of how to use Stripe webhooks in your e-commerce app and create a seamless payment experience for your customers.
    This tutorial is part of our Next.js 13 Full Stack E-commerce App series, where we cover everything you need to know to build a complete e-commerce app using Next.js.
    LIKE, SHARE & SUBSCRIBE!

КОМЕНТАРІ • 20

  • @AfonsoFilipeJr
    @AfonsoFilipeJr Рік тому +1

    Thanks once more mate. Hope you're better now.

  • @akhror-oshie
    @akhror-oshie Рік тому

    Thanks, Abbas!

  • @reybaiqi
    @reybaiqi Рік тому +1

    Thanks bro

  • @mdabdullahhosen5404
    @mdabdullahhosen5404 4 місяці тому

    is it needed to always be opened the cli? I mean the app gonna run in the surver automatically and there is no way of running the cli indeed. What to do then? Please clear me. Thanks in advance!

  • @samking618
    @samking618 11 місяців тому

    at 14:35, in case anyone is facing Failed to POST error in Stripe CLI, make sure to add res.end() in your webhook function in the end (after console.log(line_items)

  • @optimusprime844
    @optimusprime844 Рік тому +1

    Thanks bro, where are the rest of the videos?

  • @TerryMitchell
    @TerryMitchell Рік тому +1

    Hi Ghulam! Another great lesson! However, I'm receiving an error back from Stripe, despite my order being successful, here's the error:
    [ERROR] Failed to POST: Post "localhost:3000/api/orders/webhook": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    I've cross-referenced every file from today's lesson with the code from your repo and can find no error and the payments are all registered on Stripe just fine, Stripe's just unable to post back to my webhook - do you have any idea why this might be happening?
    many thanks once again for your time and the great tutorials.

    • @codingwithabbas
      @codingwithabbas  Рік тому +1

      Are you sure your order was created?

    • @TerryMitchell
      @TerryMitchell Рік тому

      @@codingwithabbas Thanks for the quick response!yes, the 'payments ' are in my Stripe account - it's just not posting to my webhook - I'll investigate further tomorrow and get back to you.
      I've had to return to another job right now.

    • @akhror-oshie
      @akhror-oshie Рік тому +1

      the same thing happened to me too, order was created
      --> checkout.session.completed [evt_1N56krFLHlsWHGueN9TX0A3D]
      [ERROR] Failed to POST: Post "localhost:3000/api/orders/webhook": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

    • @TerryMitchell
      @TerryMitchell Рік тому +1

      @@akhror-oshie Hi! I'm not sure if you've done the same as I did, before, in orderControllers > checkoutSession() - "metadata: { productId: item.product }," was throwing an error for me and I got it to work using metadata: { productId: item._id }, - somewhere along the way, this must have been resolved as I have now fixed the "[ERROR] Failed to POST:" by reverting to "metadata: { productId: item.product }" - hope that's of some use... Apolgies Ghulam! My bad!

    • @akhror-oshie
      @akhror-oshie Рік тому +1

      ​@@TerryMitchell Thanks for your answer, but it does not work with my case, still I have received the same thing, interesting