#NotP_Do
1 messages ยท Page 1 of 1 (latest)
Just for some background the invoice is in combination with a subscription using add_invoice_items
ii_kdWHdsMKdcs62qwqfWN
๐ let me take a look
thanks
So the issue here is that an Invoice's line item will give you back the full price (https://stripe.com/docs/api/invoices/line_item?event_types-payment_intent.payment_failed#invoice_line_item_object-price) by default, but price.product needs to be expanded and won't be returned by default (https://stripe.com/docs/api/invoices/line_item?event_types-payment_intent.payment_failed#invoice_line_item_object-price-product)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So when you retrieve the Invoice you'll need to expand lines.data.price.product to see the full product and get product.images (https://stripe.com/docs/api/products/object?event_types-payment_intent.payment_failed#product_object-images)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I gave that a go and got hit with a Request req_sip8bdSFs: You cannot expand more than 4 levels of a property
since lines is inside latest_invoice I expanded as such latest_invoice.lines.data.price.product
Yeah that's why I mentioned you would have to retrieve the Invoice to expand this - you can't expand this from Subscriptoin creation
understood thanks