Build a Stripe Checkout with Next.js 13

Поділитися
Вставка
  • Опубліковано 25 вер 2024

КОМЕНТАРІ • 118

  • @bstoynov
    @bstoynov 10 місяців тому +16

    This man single handedly saved Stripe because they're too lazy to update their docs for Next.js 13 ❤

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

    I'm mobile dev trying to learn web development and I struggled for so long with Strip checkout. Finally managed to implement it thanks to this video. Awesome content!

  • @KriszX12
    @KriszX12 8 місяців тому +2

    Creating the UI wasnt so important (for me) but you did it boss and I do think it is important for many of us devs. Very useful content thank you.

  • @ccccssss-df
    @ccccssss-df 9 місяців тому +1

    Thank you so much for posting this video. I'm using Stripe for the first time in my side project, and it was challenging to implement. But thanks to you, I was able to apply it smoothly.

  • @t.r.prakash6784
    @t.r.prakash6784 3 місяці тому +1

    Wow...thanks a lot for this tutorial...by the way tip for nextjs 14 users: use server actions instead of traditional route handlers

  • @1medotube
    @1medotube 10 місяців тому +1

    thanks alot! your video really helped me, Stripe documentation is not the best but you made it easy, thank you keep going!

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  10 місяців тому

      Glad it helped! Those Stripe docs can be confusing when it comes to Next.js

  • @mzafarr
    @mzafarr 4 місяці тому +1

    Amazing videos Brett!

  • @Wolf0909
    @Wolf0909 8 місяців тому +1

    Thank you so much for this! I am new to NextJS and have been fighting with making this work on my own. Your video was super clear and extremely helpful! Liked and subbed :)

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  8 місяців тому

      Thank you so much! That is awesome you are starting out with Next.js! Great framework to use

  • @gauravsharma4994
    @gauravsharma4994 Рік тому +3

    Bro all of ur videos are so helpful and easy to understand.I can even watch them in 2x . PLEASE make more videos on Next js.Thank you for such awesome content and if possible make authentication on next js with mongodb without prisma.

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

      Thank you for the kind words, coming out with a fetching data in NextJS 13 video and more

  • @jacopopaccioretti2331
    @jacopopaccioretti2331 7 місяців тому +1

    I would like to add 1000 thumbs up. Thank you so much for this tutorial.

  • @diwanshuji947
    @diwanshuji947 5 місяців тому +1

    Amazing and Very Helpful Video

  • @glauberbispo8922
    @glauberbispo8922 10 місяців тому +1

    Thanks you help me a lot, to have an idea about how I implemented, you're really tallent when it comes to teach

  • @Rikimkigsck
    @Rikimkigsck 8 місяців тому

    I just love how you try to explain everything. You are a great teacher. Liked and subbed

  • @SauravPant
    @SauravPant 9 місяців тому +1

    Thank you for the amazing explanation, Brett

  • @rajanlagah4529
    @rajanlagah4529 Рік тому +2

    Great video. I have learnt so much.

  • @rhh1090
    @rhh1090 6 місяців тому +1

    Dude this was super helpful, thank you so much!

  • @ezehbomote6384
    @ezehbomote6384 10 місяців тому +1

    Yo you play AOE 4, that's really dope. your desktop app clutter really gave me pause for a sec there tho😅😅. Loving the video so far.

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  10 місяців тому

      Thanks for tuning in! And yes I do play AOE4, do you? Yea my desktop has been recently cleaned up it was giving me anxiety as well

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

    That was incredibly helpful. Thank you!

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

    Thank you very much! Your video helped me a lot.

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

    thanks bro very informative and straight forward

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

    Awesome video.
    If you hit Alt+z in vscode, it will wrap the line so you dont have to scroll to the right to see the whole line.

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

      Thank you for tuning in! and yes I don't know why I didn't do that

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

      The video is a really good tutorial on how to get involved with stripe. The stripe documentation is not so great, as you pointed out, but watching the video, I can tell you put a lot of time into creating this tutorial. Thanks man.@@brettwestwooddeveloper

  • @DanielClipsTVS
    @DanielClipsTVS 11 місяців тому +2

    Hey bro. How do you track if a user has paid for a particular product ?

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

      This will be done through Stripe's dashboard. It will show you what they paid for.

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

    Awesome! Thank you

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

    You always have what I'm looking for (:

  • @mdshalimsadman2614
    @mdshalimsadman2614 7 місяців тому

    Please make a video on how to verify stripe payment using session ID

  • @maxskewes
    @maxskewes 10 місяців тому +1

    Hey, really appreciate the tutorial - got me really far. I called the product object api instead of the price by changing the GET method, but I need a picture, description, title, and price and this data is spread between the product and the price objects. I can find no way to set product. default_price (stripe's docs lead to a nebulous or non-existent endpoint) so it appears I need both objects to display all necessary data in one card on the site. So is there one all-encompassing object that I can get with all data (I can't find one)? Or do I need to call both, in which case I need to link them though the same product does not share an id common to both the product and the price obj. Any help on which direction to go would be much appreciated and thanks again for the concise tutorial.

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

    Very effective content. Please continue this kind of content also I want to know how to build a saas and setup free trail. You can continue this series and effectively see your growth because there are less tutorial about next 13 and app router. So, please create videos like this. Thanks for helping me buddy ❤

  • @Dongnutla
    @Dongnutla 11 місяців тому +1

    Thanks, bro. That's pretty nice

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

    great video thank you

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

    Thank you for the tutorial. I'm a bit confused about where the money goes after a successful payment.

  • @hgizem
    @hgizem 7 місяців тому

    Awesomeeee!! Thank you

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

    when I click on the button, the following runtime error is coming:

    1 of 1 unhandled error
    Next.js (13.4.5) out of date (learn more)
    Unhandled Runtime Error
    AxiosError: Request failed with status code 500
    Call Stack
    AxiosError
    node_modules\axios\lib\core\AxiosError.js (22:0)
    settle
    node_modules\axios\lib\core\settle.js (19:0)
    onloadend
    node_modules\axios\lib\adapters\xhr.js (107:12)

  • @leonardomoura9770
    @leonardomoura9770 5 місяців тому +1

    One question: it works on localhost, in production it does not display the "Elements" (form), why?

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  5 місяців тому

      You are using the Elements from Stripe? and if so make sure you are using the stripe secret and publishable key

  • @radar_raps
    @radar_raps 6 місяців тому

    I was following along up until the last bit. There's a form that the users fill out which picks the membership type. I was submitting this membership information to a sheets doc, however when I added stripe, it messed up how my data is saved and instead I get 500 internal errors. Any ideas of how I should do this and work with the flow that I want to implement?

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

    Great video. It would be good include Supabase as the backend to sync customer information, subscription type i.e. Free, Premium or Enterprise for recurring subscription

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

      I will definitely look into making that video. Thanks for the idea and support!

  • @xiiEJRAM
    @xiiEJRAM Рік тому +2

    tyyy so much , this is so helpful , please we need source code

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

    I wondered about something. Do we need to write the api part to bring our data on Stripe? Couldn't we bring our data in the client part?
    By the way, I can say that it is a great video

  • @jonathanpodvin5727
    @jonathanpodvin5727 9 місяців тому

    Hey guys, does it work with a simple "total" / "amount" ? Or I have to create a "product" for every single product from my database ?

  • @dreamtheater_92
    @dreamtheater_92 8 місяців тому +1

    How do your secrets remain secret when you deploy this static site to say S3?

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  8 місяців тому

      you would just store in env file and I know S3 even has further security that I think is a monthly fee

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

    Hey Brett can you do a simple full-stack with auth and ecommerce?

  • @learnwithfunwithrana
    @learnwithfunwithrana Місяць тому +1

    Can i save this all payment data to my database (MongodDB). How?

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  25 днів тому

      You would have to console log the the variable and I know you can save some info but not all of it.

  • @goodstuff2read
    @goodstuff2read 5 місяців тому

    Does anyone have a tutorial for doing your own products? kind of stuff on the return_url and its purpose

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

    Thank you

  • @rhh1090
    @rhh1090 6 місяців тому +1

    Both of my products have a name in Stripe (obviously) but the nickname field comes through as null.
    Any ideas? TIA

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  6 місяців тому

      You have to manually give it a nickname in your Stripe dashboard. So, if you are getting everything back and the nickname is null then you haven't created a nickname

    • @rhh1090
      @rhh1090 6 місяців тому

      @@brettwestwooddeveloper thanks for the reply. How do I do this mate? I can't see the nickname field anywhere in the Stripe dashboard/settings.

    • @rhh1090
      @rhh1090 6 місяців тому

      Found it. Update price > Advanced > Price Description

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

    Bro thanks a lot , just save me with the window.locate.assign() !
    I was fighting with the Cors so nice tips thank you really great and helpful content 👌

  • @jackepner9984
    @jackepner9984 8 місяців тому +1

    I don't understand these tuts... it just goes to the Stripe payment page... you could literally do this with a single link.

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  8 місяців тому

      I mean you aren't wrong, you can actually just use the link in an anchor tag

  • @elmurodtadjibayev3212
    @elmurodtadjibayev3212 9 місяців тому

    Bro thank you for video, If I turn off test mode, I can accept money for real?

  • @SakibAnsari-e3j
    @SakibAnsari-e3j 7 місяців тому +1

    I have deployed the project on Vercel but when I Checkout to Stripe Payment I got error 405 Method not Allowed can you tell me how can I fix this issue Locally it's wokring fine only issue I got on Live Version.

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  7 місяців тому +1

      could be a few things. Did you update the env variables inside of vercel on your project page? Also, did you use the secret key from stripe that is in production and update the URL to the production URL

    • @SakibAnsari-e3j
      @SakibAnsari-e3j 7 місяців тому +1

      ​@@brettwestwooddeveloper Hi, thank you for your response. I've included the Stripe Secret Key, Stripe Publishable Key, and Production URL. Could we connect on another messenger briefly? I could really use your help to resolve this issue. Thanks a lot.

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  7 місяців тому

      join my discord and send me friend request
      @@SakibAnsari-e3j

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

    im having issues accessing the payment data and assigning it to a db attached to a User OBJ. that then has to check if subscription is activeor not.

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

      Can you send me some of the code so I can try to debug it, I can invite you to a discord server or you can email. Which do you prefer?

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

      @@brettwestwooddeveloper heeey thanks for the response, I actually figured it out . I placed a web hook on my app and added it to stripe webhooks. They have a easy to use playground and testing environment. Thank you for the response! Your one of few ppl that actually reply to help! Thank you

  • @filipjnc
    @filipjnc 11 місяців тому +1

    Why not make use of the app dir and make "Pricing" an RSC fetching the prices server-side. Doing it in an useEffect is highly inefficient, not rendered on the server, no SEO, etc.

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

    Hey, I have a request, make a full stack app project in NextJs 13.3 for people who are coming straight from react and have never learnt Next js 12 (I did isse NextJs 12 but it's redundant now)
    Because NextJs 13 is so new for us beginners that the only way to learn it properly is to make a project ( a project with lots of api handling and backend stuff that a typical junior react developer will use in a small project in a company)
    I don't see a lot of people making such projects yet that explain how handling api calls differs from normal React + node/express setup

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  Рік тому +2

      okay will do

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

      @@brettwestwooddeveloper thanks a lot, btw I liked your sidebar video, very clear and concise, generally I don't like long videos but that one was very good, and if possible always implement some accessibility features like aria-labels and roles in your components, not too many just the basic ones that will let screen reader users navigate the website

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

      @@blackpurple9163 I don't have a sidebar video.

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

      @@brettwestwooddeveloper
      This one bro
      Side navbar
      ua-cam.com/video/8s4DK5PkRNQ/v-deo.html

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

      @@brettwestwooddeveloper ua-cam.com/video/8s4DK5PkRNQ/v-deo.html
      This

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

    will this be the same for reocurring prices?

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

      just change mode to subscriptions instead of payment. Also, in Stripe dashboard have payment reoccuring

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

    Kindly zoom in while video making

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

      I did, what device are you watching on and what specific part is hard to see?

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

      Just bigger font size

  • @sadique_x_
    @sadique_x_ 6 місяців тому +1

    Is it my eyes or the man's page isn't pure white

  • @ziacodes
    @ziacodes Рік тому +2

    👋Hey Brett, Wanna play Fortnite sometime? 😅

  • @sadique_x_
    @sadique_x_ 6 місяців тому +1

    please focus on the stripe part rather than the styling part next time man!

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

    BROOO ty so much, the window.locate.assign() save my life!

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

    Legend.