#ben-syndica
1 messages · Page 1 of 1 (latest)
All other items are shown in the upcoming invoice except that one.
Which subscription do you expect si_O8xzVo244mJb2u to show? Is it sub_1NMfztITZzlUK3bStQxdJckC: https://dashboard.stripe.com/test/subscriptions/sub_1NMfztITZzlUK3bStQxdJckC ?
sub_1NMfztITZzlUK3bStQxdJckC
How did you see that the si_O8xzVo244mJb2u isn't in upcoming invoice? From the Dashboard, the namings of the items in the upcoming invoice are the same. If it's through upcoming invoice API, can you share the request ID (req_xxx) and its response?
Stripe doesn't log the response body of the request, so I couldn't see the response your system received. Could you also share the response your system received?
Deleted it, please ping me if you need it again.
I've downloaded it and looking into it now
Oh! I know why! si_O8xzVo244mJb2u was calculated in the upcoming invoice, but lines only shows up to 10 items, but it actually has 12 items. You may use pagination to get all the lines in the upcoming invoices: https://stripe.com/docs/videos/developer-foundations?video=pagination&lang=go
In the response, lines.has_more shows as true, i.e. more lines are included, but not returned in this specific response: https://stripe.com/docs/api/invoices/object#invoice_object-lines-has_more
You may use lines.url to get the full list of lines: https://stripe.com/docs/api/invoices/object#invoice_object-lines-url
Thanks! I'll give it a shot
No problem! Happy to help 😄
@grave elbow - We're using v72, I can't seem to find the API call to get the upcoming invoice line items
Are you using invoice.UpcomingLines? https://stripe.com/docs/api/invoices/upcoming_invoice_lines?lang=go
From the change logs, this method is included in v73 onwards: https://github.com/stripe/stripe-go/wiki/Migration-guide-for-v73
So v72 has no ability to get all the items for upcoming invoice?
Yup! v72 doesn't support getting the lines of the upcoming invoices: https://github.com/stripe/stripe-go/blob/v72.122.0/invoice/client.go
It's only supported from v73 onwards: https://github.com/stripe/stripe-go/blob/v73.0.0/invoice/client.go#L222-L242
Bummer, thanks for the detail