#vaibhav710
1 messages · Page 1 of 1 (latest)
Hello! You're using stripe.redirectToCheckout which is deprecated. You should be creating the Checkout Session on your server and then redirecting your customer to the Checkout Session's url instead: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url
Hi @west cedar - I still see that in the documentation link, price object is passed but can we override that with custom amounts?
Yes, you would use price_data instead of price.
ok @west cedar - let me know if I am understanding correctly. so this code snippet from the link you sent.
This snippet has to deployed as a separate application on any cloud hosting service and the code running in the controller.js should be able to execute that previously deployed code and its response is what we capture and extract the URL tag and redirect the customer to the said URL? Is my understanding correct?
I'm not 100% sure what "controller.js" refers to, but I think you have the basics correct, yes.