#Yarrik_b-checkout
1 messages ยท Page 1 of 1 (latest)
Hello! Let me take a look
When you say 'list_items' what are you referring to? and what language are you using?
I am using Node.js
i use create method on session.checkout object. when i using create method, i pass an object of parameters, and one of them is list_items. but when i try to call it (e.g. console.log(session.list_items)), i get undefined.
i was using this section of documentation: https://stripe.com/docs/api/checkout/sessions/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hi there ๐ taking over here
There are a lot of reasons that you could be getting undefined for that object. Do you get anything back for the session? In other words, does console.log(session); give you anything?
yes, it gives me full session object
and also i used Expanding request where i passed id of the session and object {expand:['line_items'],}, i've got my another session with my needed property line_items. but i still can't understand why i can't get line_items directly from my initial session object
i used this guidance: https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.