#charun_subscription-preview
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/1278000080942796842
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Can you show me an example with the unexpected behaviour?
I would expect the update you shared to apply on the next invoice as you expect
So what happened?
I see the upcoming invoice on the subscription for the request you shared having your "effective tax" applied for $24.15
so what is not working like you expect?
For example, I just changed the tax rate from 5.5 to 9.7 for this one, but the tax rate on the upcoming invoice is not changing to reflect the 9.7% tax rate
you can see how the tax rate in the "Pricing" section is different from the one in the line item in the upcoming invoice
this is the request id for the call i just made: req_CDger2298CnLhT
Looking at sub_1Ps8s9HHHT1qJ1rwOX6RsSaw i see the upcoming invoice with the new amount
will look at this one now
So in the two examples you've shared, the difference is the use of a test clock or not
in the first example, you've advances a test clock past sept 3 2024, so that invoice has already happened, then the "upcoming" invoice is for sept 3 2025 renewal with the new rate
in the latest example for sub_1Ps4t7HHHT1qJ1rwZW0LZlvZ, you did not use a test clock and we are still in the trial period before sept 3 2024
In which case that preview in the dashboard may simply be wrong
If you retrieve the invoice preview using the API and see how it looks?
or try the same change (update tax during trial) with test clocks and fast forward to see what is actually invoiced
Yeah, let me test both pulling with the invoice API instead of the dashboard and also with the test clock. I will reply in this thread in a bit with updates on this
๐
Did not get to test clock yet, but in this sub that I just created, the effective tax in both the dashboard and the preview invoice are not correct: sub_1PsR0MHHHT1qJ1rwmiUdzxPy
Sub was created with a tax rate of 5.5%, then updated with an api call to update the subscription's default tax rate to one with a rate of 9.7%
Hmm ok yea I see the same. Would you be able to write in to support with this example and a short repro script you use to test this? It does seem like something we need to improve here.
Though first it would be great if you could verify the test clock behaviour and the actual invoiced tax
Yep, let me see what the actual invoiced amount is, but my concern was that we're showing an incorrect next payment amount to users when their address/tax rate changes
charun_subscription-preview
so, I tried creating a new subscription with a test clock, and I'm seeing behaviors that look very incorrect to me. First, the subscription is created with a tax rate of 5.5% (sub is in trial for 7 days). I then update the tax rate to be 9.7%, which resulted in the issue above (incorrect tax rate on upcoming invoice but correct on the subscription object). However, when I advance the test clock, the invoiced amount is still the old tax rate (5.5%) AND the tax rate on the subscription gets reverted back to 5.5% even though I did not change that at all. Can you confirm that what I'm seeing is a bug? The first half we know is an issue that we'll need to reach out to support about, but I just want confirmation that the second part is also an issue
the subscription is sub_1PsRocHHHT1qJ1rwdFsueZ7R