#NotP_Do

1 messages ยท Page 1 of 1 (latest)

noble pelican
#

Hello! Do you mind sharing the Invoice you're looking at?

pallid hawk
#

Just for some background the invoice is in combination with a subscription using add_invoice_items

#

ii_kdWHdsMKdcs62qwqfWN

noble pelican
#

๐Ÿ‘ let me take a look

pallid hawk
#

thanks

noble pelican
#

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)

pallid hawk
#

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

noble pelican
#

Yeah that's why I mentioned you would have to retrieve the Invoice to expand this - you can't expand this from Subscriptoin creation

pallid hawk
#

understood thanks