#Anil
1 messages · Page 1 of 1 (latest)
Hi there, this is a local regulation where buyer information is mandatory https://stripe.com/docs/india-accept-international-payments#international-payments-for-goods
You can set both billing_address_collection and shipping_address_collection to let Stripe Checkout to collect these info from customer
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session refer to the API reference for details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay
And stripe.redirectToCheckout method takes product id from stripe
How we can give product details coming from backend
redirectToCheckout is already deprecated. You should create checkout session from backend, and redirect your customer to the checkout session's URL.
Is it not possible to add stripe.checkout.sessions.create in the frontend
i'm afraid i don't understand what you mean? stripe.checkout.sessions.create is an event - an event is handled by your backend server. Is there a reason why you're trying to add stripe.checkout.sessions.create in the frontend?
I have a button which will open stripe payment gateway. So i am thinking if i can call this event on "onClick"
i think you've gotten mixed up between an event and a request. If you're looking to create a Checkout Session when the customer clicks on a button, then i suggest you take a look at this guide to get started : https://stripe.com/docs/checkout/quickstart
Okay, thanks.
Can you please tell me what's the difference in checkout session if i create it on a button and from the server
Hi @shell notch are you talking about the Buy button? https://stripe.com/docs/payment-links/buy-button
No, i am looking to create checkout session when user click on a button
Creating a checkout session requires a secret key so you can't create it from frontend.