#a2e_maxammann
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/1435600236440719390
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
I'm basically fighting with this breaking change: https://docs.stripe.com/changelog/basil/2025-03-31/invoice-preview-api-deprecations
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
I'm gonna have to jump unfortunately for ~1h but let me know if you need more information
this is it: req_4v9grxUJnBu8aY
btw I also have another question which is how to conver the preview into an invoice. Previously it was possible to pay upcoming invoices. This is the reuqest for that problem: req_3dc5u0cYcPEUNY
What is the expected output from this request req_4v9grxUJnBu8aY?
The expected outcome is that of calling the previous API https://docs.stripe.com/api/invoices/upcoming?api-version=2024-11-20.acacia
The documentation is identical so this should work.
Also summarizing 2 problems here:
- I'm unable to create a preview invoice for all subscriptions or all open invoices items
- I'm unable to "pay" preview invoices
- I'm unable to create a preview invoice for all subscriptions or all open invoices items
You need to list the subscriptions and then use the preview API in order to fetch the corresponding invoice preview
- I'm unable to "pay" preview invoices
Yes that's exepcted, you can pay only open invoices (created one)
Ok but then I'll end up with multiple invoices
Before the breaking change it was a possible to have only one
Is there an API to create one matching the preview?
If you want to remain on a previous API you can make some API call with an explicit APi version
Definitely I want to update however. The API library we are using is updating so it's a about time.
However you are right! We could leave that one endpoint on the old version
A bit hackish but that might work until I find a good solution
If you have multiple Subscriptions, then you'll have multiple invoices
Not sure I understand the difference here, do you have a request Id with the previous API version?
here you go: req_Fb3VZZwpu85orx
that one only gets has a customer as paramter and returns an invoice. I'm trying to have the same behavior in the new API
That customer at that moment, had only one Subscription then ?
I do not know that. The documentation says:
If neither subscription nor subscription_details.items is provided, you will retrieve the next upcoming invoice from among the customer’s subscriptions.
Its plural subscriptions
maybe its only the most recent but then the docs are wrong
Yes but the invoice is for one single Subscription
Interesting, I wonder how the previous one chose it if there were multiple subscriptions
btw I'm currently trying to fall back to the old method so I can move forward. still interested though in how to do the upgrade later on
@daring brook if you dont want to read the above the issue is that the new create preview api behaves differently than the previous upcoming api
if only the customer is provided, the old api returns a result, the new one returns an error
Hey there
Yes that seems to be the specific change here
Additionally, you can no longer preview the next invoice for a customer across all their subscriptions on the Create Preview Invoice API.
so you must specify eg asubscription(or similar) you want to preview
ooh I skipped that one