#lyubo_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1399475205327421462
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
How do I retrieve these items here
they have a price tag and quantity. How do I do that without a session? Currently the payment is successful and I just need these items as an object. I am using PHP
Hello
There's no way to get to the line items directly without the Checkout Session object ID.
You can find the relevant Checkout Session ID by using the List API + PaymentIntent ID - https://docs.stripe.com/api/checkout/sessions/list#list_checkout_sessions-payment_intent -> Then you can retrieve Checkout Session Line items using this API - https://docs.stripe.com/api/checkout/sessions/line_items
Sure, Imma go $sessions = $stripe->checkout->sessions->all(['limit' => 3]);
dd($sessions->data[0]->payment_intent); so this retrieves the payment intent - pi_3RpvxUJEmfhShZIO1IWSRhVF. Do I need to use it in order to retrieve the lists now? ?
Oh yeah it worked
omg finally...
Thank you so much I tried 100 things
lol
NP! ๐ happy to help
I was about to throw myself from the building where I live ๐
Thank you and have a good one ๐
Another quick tidbit, I think you may also be able to do this in one call. The line_items property on the Checkout Session is expandable, so if you include expand=['data.line_items'] I think we should include them in that first list call
I was about to throw myself from the building where I live ๐
Oh please don't!! We're here to help anytime you're stuck with Stripe SDKs/APIs ๐
You have a good one as well.
Yup what Pompey suggested might work too (just in an array)
Well, my code is a bit more complex soo thats all I need
I just needed a small push
Btw what are your work hours?
We're 24 hours during the work week. Global coverage! I think we typically start around 9 PM on Sundays and close around 5 ET or 5 PT on Fridays
Awesome :))) Appreciate it