#alex-from-fuxam_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1425391530033680384
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Unclear what this code is doing? I don't think that's ever worked โ you're trying to retrieve a single Invoice ID, not list them
yes that property was removed in a breaking API version back in March
Im trying to fetch an upcoming invoice for a particular subscription
That's the wrong endpoint entirely then. You need to use the Invoice Preview endpoint: https://docs.stripe.com/api/invoices/create_preview
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 it doesnt automatically create preview invoices anymore?
I don't think we ever automatically creates invoice previews? There was a (now deprecated) upcoming invoice endpoint, maybe you're referring to that? But invoices.retrieve doesn't accept a subscription parameter
https://docs.stripe.com/api/invoices/upcoming?api-version=2024-11-20.acacia&lang=node
This is what I was referring to, is this entirely deprecated?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It's deprecated by the preview invoice endpoint yes. But you can still use it
But the code you shared is not using that endpoint. It's using this: https://docs.stripe.com/api/invoices/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Well it depends on the SDK version
It is removed in some API versions
Remove support for listUpcomingLines and retrieveUpcoming methods on resource Invoice
https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#1800---2025-04-01
Another question i had written was about the subscription on the invoice. IS that removed entirely? Is there a way to expand that somehow?
You'd find that in the parent property: https://docs.stripe.com/api/invoices/object#invoice_object-parent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.