#hamidm-upcoming-tax

1 messages ยท Page 1 of 1 (latest)

proven quarry
#

Hello! Proration and tax can be tricky to grasp. Do you have a good summary of the problem with exact code and object ids we can look at?

hard lantern
#

this is the request ID for that response req_SR88mQ8sD4klu2

novel light
#

catching up, give me a sec

novel light
#

sorry for delay, digging now but can you share an example for what you expect, vs what you receive, with explicit details? that would help me understand with clear examples, thanks!

hard lantern
#

Let's say the initial subscription has been created with quantity = 15, price per quantity is $5 and the subscription in created a week ago, and the tax for quantity 15 will be $3.60 which is $0.24 tax per quantity. Now, when we want to purchase new seats (increment quantity for 5) so in total will be quantity = 20, when getting the upcoming invoice with proration the prorated amount per quantity will be $4.85, now for this prorated amount we need to get the exact tax amount but the response from upcoming invoice endpoint is returning a totally different amount. How can we get the correct tax amount for the prorated amount?

novel light
#

for the example you linked above, what are you expecting for total tax amount

hard lantern
#

based on the prorated amount per quantity $4.85 the tax amount per quantity should be around $0.22 so for the incremental quantity of 5 (purchased seats) total tax for them should be $1.14, but on the "tax" attribute from the response we are getting 399 (which is $3.99)

novel light
#

the json linked above has

    "total_tax_amounts": [
        {
            "amount": 580,
#

not 399

hard lantern
#

yes 580, sorry

proven quarry
#

๐Ÿ‘‹ sorry the channel is quite busy. I'll look in a bit but it will take a while

hard lantern
#

no problem, take your time

proven quarry
#

okay sorry things calmed down, looking now

proven quarry
#

@hard lantern are you still around?

#

The call you make simulates the next invoice for the next cycle. It will contain both the proration for the quantity change now and next month's cycle