Getting started with Next.js and Stripe

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024

Комментарии • 35

  • @transcendcapitalism
    @transcendcapitalism 2 года назад +7

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

    • @StripeDev
      @StripeDev  2 года назад +1

      Thanks Rachel! Appreciate your kind words.

  • @HtopSkills
    @HtopSkills 2 года назад +2

    Useful demonstration

  • @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 Год назад +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 Год назад +1

      you can fetch thru SSR.

  • @StripeDev
    @StripeDev  2 года назад +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 :)

  • @CoericK
    @CoericK 2 года назад +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  2 года назад +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 🙏 😉

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 года назад

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

  • @worldclasscode1847
    @worldclasscode1847 2 года назад

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

  • @clipartinc
    @clipartinc Год назад +2

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

    • @StripeDev
      @StripeDev  Год назад

      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 Год назад

      @@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 Год назад +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 Год назад +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.

  • @shannoncole6425
    @shannoncole6425 2 года назад +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 2 года назад

      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  2 года назад

      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 2 года назад

      @@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 :)

  • @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

  • @mohamedabualula4506
    @mohamedabualula4506 2 года назад +1

    will there be a next part soon ?

    • @paulasjes5852
      @paulasjes5852 2 года назад +3

      Working on it! Should be out soon!

    • @clipartinc
      @clipartinc Год назад +1

      @@paulasjes5852 Is it out yet?

  • @yacoubakone2745
    @yacoubakone2745 2 года назад +3

    J'aime beaucoup stripes mais ici non

  • @anhvuuc8693
    @anhvuuc8693 Год назад

    Your theme look so DARK, a litle hard to see

    • @StripeDev
      @StripeDev  Год назад

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