#vladP - Checkout

1 messages ยท Page 1 of 1 (latest)

blazing hare
#

Hello! Not sure I understand your question, can you provide more details, such as an example scenario with example URLs and behavior?

remote ingot
#

So in my success page url I have the checkout session id

#

and when I change it I still am on the success page

#

And so I dont want my customer to be able to change the checkout session id in my url

blazing hare
#

Ah, gotcha. This is something you would need to handle on your end. The behavior of your success page is entirely up to you.

chrome halo
#

Copy/pasting your question here for convenience: "Hello again, is there any way I could retrieve the quantity from my checkout session"

#

Yup! You can either retrieve the line items from your checkout session (https://stripe.com/docs/api/checkout/sessions/line_items) or you can expand line_items when you retrieve the whole Checkout Session (https://stripe.com/docs/api/checkout/sessions/retrieve) and that should tell you the quantity for each line item

remote ingot
#

Sorry for the late reply but how do I expand the line_items when I retrieve the whole checkout session

chrome halo
remote ingot
#

Thank you so much I got it now

chrome halo
#

๐Ÿ‘ awesome!

remote ingot
#

actually I have a problem. When I try to append the quantity to a textbox it just says that its undefined.

#

this is the code that I used

chrome halo
#

session.line_items.data is an array - you need to do something like session.line_items.data[0].quantity instead