#johnatran-Checkout
1 messages · Page 1 of 1 (latest)
hi there! Are you creating a Checkout Session serverside first before using stripe.redirectToCheckout?
I am not. But I am now considering it so that I can set the PaymentIntent.
I was following instructions here (#3) to add custom-code to my webflow website: https://stripe.com/docs/payments/checkout/client#customize-checkout-button
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"?
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
i'd suggest referring to this guide : https://stripe.com/docs/checkout/quickstart
there is an alternative also, you could use payment links
so if you have a set Price/Product, you could create a single Payment Link via the API : https://stripe.com/docs/payments/payment-links/api. Then redirect the user to that Payment Link
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.
to clarify, is it a set list of items that you're selling?
so what I'd suggest you do, is to maybe just use cURL and your secret key. Then create the payment link for that particular item with capture_method=manual : https://stripe.com/docs/api/payment_links/payment_links/object#payment_link_object-payment_intent_data-capture_method
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
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.
the thread will auto archive after a while. I'd recommend just asking your (probably) new question in the channel again