Getting started with Next.js and Stripe

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น • 35

  • @transcendcapitalism
    @transcendcapitalism 3 ปีที่แล้ว +7

    This is the most helpful/effective Stripe Developers channel video I've watched. Hope you do more!

    • @StripeDev
      @StripeDev  3 ปีที่แล้ว +1

      Thanks Rachel! Appreciate your kind words.

  • @StripeDev
    @StripeDev  3 ปีที่แล้ว +3

    Hey there - the best framework would be the one you're most comfortable with and that matches your other use cases. If you have any further questions, reach out to us at support.stripe.com/contact.

    • @worldclasscode1847
      @worldclasscode1847 2 ปีที่แล้ว

      I use react + firestore + stripe checkout + webhook in firebase cloud function :)

  • @espressothoughts
    @espressothoughts 2 ปีที่แล้ว +8

    Why are jumping through hoops putting your api keys in other files only to expose them in your front end code with fetch?
    Since you’re using nextjs, if you deploy to Vercel they support environment variables in production and development. Not to mention you can just load them in from a .env file

    • @ysfmag
      @ysfmag 2 ปีที่แล้ว +1

      Exactly ,
      Expose environment variables to the browser by prefixing with NEXT_PUBLIC_
      Stripe Example :
      in .env
      NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=sp_test_xxxxxxxx
      in your app (front code)
      const STRIPE_PUBLISHABLE_KEY = env.process.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY

    • @Cadencuenza
      @Cadencuenza 2 ปีที่แล้ว +1

      you can fetch thru SSR.

  • @CoericK
    @CoericK 3 ปีที่แล้ว +4

    Quick question, why did you create an endpoint just to get the keys, why didn’t you read the environment variable directly from the .env file ?

    • @StripeDev
      @StripeDev  3 ปีที่แล้ว +6

      Hey Erick! In general, browsers cache your JS code. Retrieving the public key from an endpoint makes it easier to update your key (in case you ever need to) on applications. This especially applies for building for mobile clients where the public key shouldn't be embedded into the app’s source. You can manage that on the server.

    • @discontinuity
      @discontinuity 2 ปีที่แล้ว

      @@StripeDev Hey! I'm building a static generated site with NextJS, (like serverless). Is it still possible for me to just .ENV the keys into my site and basically 'run build' whenever I need to update the site? Looking for a good serverless payment style and I want to know if Stripe supports it

    • @secretsanta3029
      @secretsanta3029 2 ปีที่แล้ว +1

      @@StripeDev But wouldn't it make our system easily hackable ?

    • @espressothoughts
      @espressothoughts 2 ปีที่แล้ว

      @@secretsanta3029 yep. it exposes the key!

    • @Orbicalaz
      @Orbicalaz 2 ปีที่แล้ว

      @@StripeDev can you demo stripe subscription and Next js please 🙏 😉

  • @HtopSkills
    @HtopSkills 3 ปีที่แล้ว +2

    Useful demonstration

  • @shannoncole6425
    @shannoncole6425 3 ปีที่แล้ว +1

    Awesome! Thanks, great video. Have any resources/tutorials/videos on how to use this next.js to create a membership site where the user would create an account, select a monthly plan, complete stripe transaction, and then authenticate the user to display only the content based on the plan selected through Stripe. I'm learning so if there's a better solution let me know! Thanks.

    • @shannoncole6425
      @shannoncole6425 3 ปีที่แล้ว

      My goal is 1) User creates an account, chooses a plan, and then logs in. 2) Once logged in they will link their account with a 3rd party service (quickbooks) to allow them to use my site to perform actions that would then be sent to quickbooks via the API. Thanks if you can provide some input on this. Thanks!

    • @StripeDev
      @StripeDev  3 ปีที่แล้ว

      Hey Shannon! We don't have a pre-built solution for what you're describing. Are you a developer? If so you'd need to write the code for this specific use case yourself. If you aren't a developer we have a variety of resources here to look into hiring someone who will be able to do this: stripe.com/partners/expert-services

    • @shannoncole6425
      @shannoncole6425 3 ปีที่แล้ว

      @@StripeDev I’m a hobby developer trying to learn to build it myself. 😂

    • @worldclasscode1847
      @worldclasscode1847 2 ปีที่แล้ว

      I have a similar goal with my app. See my tutorial. No need to use next js, cloud function webhook do the trick :)

  • @worldclasscode1847
    @worldclasscode1847 3 ปีที่แล้ว

    What is best for payment back end? Next JS, or Firebase Cloud Functions Webhook?

  • @marcinlipski5975
    @marcinlipski5975 ปีที่แล้ว

    Is this suppose to cover live server setup?its not clear in which environments you inted to build this?

    • @StripeDev
      @StripeDev  ปีที่แล้ว

      This video covers the integration with Stripe in a server. It is meant for both dev and live server. The difference is the test mode and live mode key used. You can toggle the same integration between dev and live with keys in different modes.
      All documentation used in this video can be found here: stripe.com/docs/issuing

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 ปีที่แล้ว

    Awesome video ++++++++++ 😃

  • @mohamedabualula4506
    @mohamedabualula4506 3 ปีที่แล้ว +1

    will there be a next part soon ?

    • @paulasjes5852
      @paulasjes5852 3 ปีที่แล้ว +3

      Working on it! Should be out soon!

    • @clipartinc
      @clipartinc 2 ปีที่แล้ว +1

      @@paulasjes5852 Is it out yet?

  • @clipartinc
    @clipartinc 2 ปีที่แล้ว +2

    This video is great, but it's only half the process. Why leave us hanging like that?

    • @StripeDev
      @StripeDev  2 ปีที่แล้ว

      Thanks for the feedback! We don't have a follow-up yet but be sure to keep an eye out for it in the future.

    • @clipartinc
      @clipartinc 2 ปีที่แล้ว

      @@StripeDev You said it will be coming about 7 months ago and now you say keep an eye out for it? Just say NO, you do not have a follow up to the video and NO you're not going to finish that video. Thanks!

    • @neverforget1575
      @neverforget1575 2 ปีที่แล้ว +1

      @@clipartinc stripe dont understand that junior devs are more important then they realise, if another payment API comes out and does really good tutorials they will fall by the wayside and will only have themselves to blame! Not ONE easy to follow stripe connect tutorial in ANY language, then when you go to look at one just for payments they dont even bother to finish it!

    • @clipartinc
      @clipartinc 2 ปีที่แล้ว +1

      @@neverforget1575 Yes, it is frustrating! I wish Stripe would make a complete video for each framework instead of bouncing around projects. It seems all of the tutorials use a different method and none of them seem to work correctly anymore.

  • @yacoubakone2745
    @yacoubakone2745 3 ปีที่แล้ว +3

    J'aime beaucoup stripes mais ici non

  • @anhvuuc8693
    @anhvuuc8693 2 ปีที่แล้ว

    Your theme look so DARK, a litle hard to see

    • @StripeDev
      @StripeDev  2 ปีที่แล้ว

      Hi there-we're always looking at ways to improve our processes, so certainly do appreciate the insight here!