#johnatran-Checkout

1 messages · Page 1 of 1 (latest)

neat plaza
#

hi there! Are you creating a Checkout Session serverside first before using stripe.redirectToCheckout?

lilac eagle
#

What would be what you are thinking here @neat plaza ?

Would I create the Checkout Session and then pass it in as a "sessionId" to "redirectToCheckout"?

neat plaza
#

onesec, let me take a look at that page

#

hmmm, yeah, you don't have a choice, you're going to need to create the Session in your server first cause redirect to Checkout doesn't have capture method as a parameter to pass through

#

there is an alternative also, you could use payment links

lilac eagle
#

Hmm. I only have access to vanilla html/js + jquery.

#

Since I am trying to build this on webflow, I don't necessarily have access to their backend service.

neat plaza
#

to clarify, is it a set list of items that you're selling?

lilac eagle
#

Nope. Just one item

#

But that one item I can only sell X times

neat plaza
#

then you'll get a URL in the response

#

you can just redirect to that URL when the customer clicks a button on your website

#

the reason why you have to create the Payment Link via the API is because the Dashboard doesn't currently support this parameter for Payment Links

#

it may in the future, but it doesn't right now

lilac eagle
#

I will try that. Thanks @neat plaza ! If I still need help on this thread in the coming days, would I continue this thread or start a new one?

I'm not sure how the staff on this discord operates and if y'all take turns. I don't want to constantly ping you @neat plaza if you're off.

neat plaza
#

the thread will auto archive after a while. I'd recommend just asking your (probably) new question in the channel again