stripe / stripe-node

Node.js library for the Stripe API.
https://stripe.com
MIT License
3.85k stars 748 forks source link

Product Data metadata is not returned when calling listLineItems #2142

Closed fearthelettuce closed 2 months ago

fearthelettuce commented 2 months ago

Is your feature request related to a problem? Please describe.

I'm writing my function to fulfill orders, and trying to identify products in my db based on the metadata sent on price_data.product_data.metadata. However, the response object of stripe.checkout.sessions.listLineItems returns an empty object for metadata. This is not specified in the API docs, so I don't think this is a bug.

Describe the solution you'd like

I would like stripe.checkout.sessions.listLineItems to return the metadata object, or to allow the ID to be set when dynamically creating products on product_data.

Describe alternatives you've considered

I have to store the line_items in my db and reference those instead of using listLineItems

Additional context

No response

helenye-stripe commented 2 months ago

Hi @fearthelettuce! Unfortunately, these GitHub issues are limited to stripe-node bugs only. I suggest contacting the support team to submit your feature request: https://support.stripe.com/contact.