#nstripe0_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/1270964266739957802
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- nstripe0_api, 6 days ago, 8 messages
- nstripe0_api, 6 days ago, 12 messages
Stripe doesn't store response for GET request. Could you share the response you actually received and the total amount you expected it to be?
Hi river
I'm testing upcoming invoice API to see how proration calculations look and am getting some unexpected results.
I'm switching from one Yearly price to another Yearly price.
The current Yearly price is $246. The new Yearly price is $384.
When attempting to get the upcoming invoice for this price change, it shows an amount due of $558.33
It seems to be calculating the amount due as Prorated New Price + Prorated Old Price (negative amount) + New Price + tax.
Any insight into why it seems to be doing this?
Ok, I'll dump out the raw response... one moment...
Can you try using Invoice Preview API, so that I can check the response since it's a POST request? https://docs.stripe.com/invoicing/preview
Oh ok, I'll give it a try.
@floral citrus I think this is it: req_AnJprbwVlCL2cg
I guess it is adding the subscription line item to the total. I'm not sure why it does that.
Ah! This is the preview of the next invoice, i.e. the proration in current year will only be added into the next year invoice, not creating proration invoice immediately at the time of updating the subscription.
The breakdown here are all include tax:
- Unused time on SmugMug Account - Portfolio Yearly after 08 Aug 2024 > -$262.84 usd
- Remaining time on SmugMug Account - Pro Yearly after 08 Aug 2024 > $410.28 usd
- 1 Ă SmugMug Account - Pro Yearly (at $384.00 / year) from 2025-08-07 to 2026-08-07 > $410.88 usd
Total: $558.32 usd
Do you intend to preview an invoice that prorates immediately?
Yes, that's right.
In this case, I'd recommend setting subscription_details.proration_behavior to 'always_invoice': https://docs.stripe.com/api/invoices/create_preview#create_create_preview-subscription_details-proration_behavior
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 should include the proration only
Ah, I see now. Great, thanks!