#sockervadd-checkout
1 messages · Page 1 of 1 (latest)
sure
I use it on a Next.js application, but since I want to use @stripe/react-stripe-js on the frontend, it seems that I don't need that server method after all
You definitely still need a server-side component to create the Checkout Session and generate a URL to redirect your customers to.
@fallen zodiac Did that answer your question?
Well going through the Stripe example itself, they dont use this server method, so I must admit that I am still confused after watching countless videos
They simply create a payment intent - which is done on the server
Then something like await stripe.confirmCardPayment on the client
Hi there 👋 taking over
If they are using confirmCardPayment then they are either (a) not using Checkout, or (b) using it in a separate workflow. These are entirely different products built on entirely different technnologies
Yep, and I think this is the reason behind my confusion
I want to use React and the elements it provides to stay on the same web app
Without being redirected to a managed Stripe checkout
Alright, and which tutorial are you following?
I was doing this one here: https://youtu.be/sPUSu19tZHg?t=1555
Learn how to create Next.js applications in TypeScript and how to benefit from types when implementing Stripe Checkout.
Resources
That uses stripe.checkout.sessions.create - but do I understand correctly then that this is not for the React part at all?
I would recommend following along with this quickstart: https://stripe.com/docs/payments/quickstart
It has most of the code you need for either React or Next
yeah sure, I will look through it again
For my use case then, I simply need to create a payment intent, and then followed by await stripe.confirmPayment
To my question then, I was not sure why they had to use await stripe.checkout.sessions.create in other places
It's not quite that simple. I would follow the quickstart step-by-step
I haven't watched the entire video, so I can't say
I think I am mixing up different Stripe technologies like you said