#sockervadd-checkout

1 messages · Page 1 of 1 (latest)

haughty monolith
#

Hello! Give me one minute and I can help

fallen zodiac
#

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

haughty monolith
#

You definitely still need a server-side component to create the Checkout Session and generate a URL to redirect your customers to.

haughty monolith
#

@fallen zodiac Did that answer your question?

fallen zodiac
#

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

rare burrow
#

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

fallen zodiac
#

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

rare burrow
#

Alright, and which tutorial are you following?

fallen zodiac
#

I was doing this one here: https://youtu.be/sPUSu19tZHg?t=1555

#

That uses stripe.checkout.sessions.create - but do I understand correctly then that this is not for the React part at all?

rare burrow
#

It has most of the code you need for either React or Next

fallen zodiac
#

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

rare burrow
#

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

fallen zodiac
#

I think I am mixing up different Stripe technologies like you said