#aidenispro-checkout
1 messages ยท Page 1 of 1 (latest)
It's all good! I figured how to make it work by using stripe.checkout.sessions.retrieve
you could also listen to the webhook event checkout.session.completed
Oh that's cool
Is there also a way to check if a session ID is valid?
Oh nevermind I could just use .catch() to catch errors
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Hey! I was wondering, when using checkout.sessions.create, it doesn't ask for an address. Is there a way to change that?
Generally your customer would supply billing/shipping address on the hosted payment page
Really? When I go to test there's no billing/shipping address field
only the country of the purchase
You probably need to pass billing_address_collection and shipping_address_collection on creation to reflect the desired behaviour: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-shipping_address_collection
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
awesome thanks
np!
@timber sand With checkout.sessions.create how can I allow the user to apply a promotion code?
You want allow_promotion_codes: https://stripe.com/docs/payments/checkout/discounts#promotion-codes
Thankyou !!!
np!