#manuel_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/1432804592349089804
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Invoice Preview API is the right endpoint for this - https://docs.stripe.com/invoicing/preview
I have been using create_preview(), but I see that the amount_due is much higher than what customers actually pay. What can I do?
Can you share more details? Like an example of where you saw the amount_due higher than what the customer paid etc.
yes, give me a sec
this is the subscription ID: sub_1SNI51ESRxUGxqvhKBBtd0J6
and this is the request ID: req_MaRi3t0He28Pqi
the amount due is higher than my total amount of the subscription even including the taxes
What amount are you expecting?
Is it possible the proration date might be off?
I think it should include the total amount with the added item on the next invoice. In other words, in this case, it would be $61.71 including taxes on the next payment
so do you want just the new item to be charged?
Sorry for back and forth but could you help breakdown the $61.71 just to make sure I'm on the same page?
it should be
2 x for additional users sales = $17.00 * 2 = $34
1 x sales module = $17.00 * 1 = $17
total excluding taxes: $51
total (wit tax 21%) = 61.71
this should be the exact amount to the next payment
right_
?*
or am i missing something?
So currently the sub sub_1SNI51ESRxUGxqvhKBBtd0J6 has -
si_TJvwPAYfrXFiQh -> price_1RT5uEESRxUGxqvhtBZv4yuk x 1 (17 eur)
si_TJvwWPH7rO1myN -> price_1RT5uFESRxUGxqvhwsRCsDoj x 1 (17 eur)
current period start -> 2025-10-28 18:57:15
current period ends -> 2025-11-28 18:57:15
Then you're making a Preview call while deleting si_TJvwWPH7rO1myN & adding price_1RT5uFESRxUGxqvhwsRCsDoj x 2 (17 eur + 17 eur)
With the preview invoice you're getting:
-
-17 eur credit for
si_TJvwWPH7rO1myNdeletion -> proration for period from2025-10-28to2025-11-28 -
34 eur charge for
price_1RT5uFESRxUGxqvhwsRCsDojx 2 for period from2025-10-28to2025-11-28 -
17 eur charge for
si_TJvwPAYfrXFiQhfor period from2025-11-28to2025-12-28 -
17 eur charge for
price_1RT5uFESRxUGxqvhwsRCsDojx 2 for period from2025-11-28to2025-12-28
If you want to calculate what the customer would be charged today then you need to set the billing cycle anchor to now - https://docs.stripe.com/api/invoices/create_preview#create_create_preview-subscription_details-billing_cycle_anchor
ok i understand
so in the next payment it will be the same amount of โฌ41.14 because of the proration?
๐ Hi taking over for the next hour. Just getting caught up.
so in the next payment it will be the same amount of โฌ41.14 because of the proration?
When you say next do you mean the invoice following the preview invoice?
yes
If nothing else is changed, and you have two 17 dollar prices on the Subscription + 21% tax then yes.
You misunderstood me. If it has the three items but the pro rata applies, would it be like before or with the new amount?
would it be like before or with the new amount
My apologizes i'm not entirely clear what you mean by this. I want to make sure we have a clear picture before answering.
nevermind man...