#ahemadabbas-d_unexpected

1 messages ยท Page 1 of 1 (latest)

patent burrowBOT
#

๐Ÿ‘‹ 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/1293154086757208114

๐Ÿ“ 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.

stoic raven
#

Hi, can you share a bit more details please?

olive violet
#

Can you please tell me how the tax is calculated?

#

I have applied tax only on one time invoice

#

18% on 30 dollar(applying coupon) is 5.4

stoic raven
#

Yes, this is correct.

olive violet
#

So how come stripe shows 5.43 in tax?

stoic raven
#

Because 40.71 - 10 is 30.71, not 30.

olive violet
#

Okay so 18% on 30.71 is 5.53

stoic raven
#

Yeah, that's true. Could you please share the Invoice ID?

olive violet
#

There is no invoice ID i used checkout session

stoic raven
#

Right, could you please share the Checkout Session ID then?

olive violet
#

cs_test_b1YEqJ5nhmNzmlPUEe1o9Bhvsx92IdRWY6rGDeHgxISEBXjh18RGPgRY3

stoic raven
#

Are you sure this is the correct ID?

olive violet
#

i can share charge id

#

ch_3Q7aJsEAZV8rgtOu1Dt53eFc

patent burrowBOT
olive violet
#

{
"id": "cs_test_b1PWpUwgPTVkI6z2XZOi9DipVbzpFQ7HAxFrUNqEiy4MZXtvoOwm1nRJ3y",
"object": "checkout.session"
}

charred jetty
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

#

For this Checkout Session no Invoice was created

#

how did you get the invoice you shared?

olive violet
#

It is a screenshot of transaction

charred jetty
#

where did you get it from?

olive violet
#

From the transaction tab

#

https://dashboard.stripe.com/test/payments/pi_3Q7a7eEAZV8rgtOu14hNscwK
I can see those on this link

charred jetty
#

let me take a look

olive violet
#

Okay

charred jetty
#

this is how the calculation is done

#

(40 - (40/40.71*10)) * 18%

#

so basically the 10$ discount is proportionally applied on each line item

#

so instead of 18% of 30

#

you get 18% out of 30,174...

#

which also explains why the Processing fees are 0.71 instead of 0.94

(0.94 - 0.94/40.94*10) = 0.71

olive violet
#

And why it has to done?

charred jetty
#

tax is applied on the discounted amount

#

so the discount needs to be proportionally distributed between the 2 line items

olive violet
#

So here 10 means the discounted amount, right?

charred jetty
#

yes

#

unit_amount - ((unit_amount/total_amount) * discount_amount)

olive violet
#

Okay thank you so much for helping me out

#

And what about if discount is in percentage?

charred jetty
#

the percentage applies the same on each line item

olive violet
#

Can you please help me understand this?

#

Here is the invoice id:- in_1Q7ad1EAZV8rgtOucP8CSKHq

charred jetty
#

what part exactly?

olive violet
#

How come tax is applied on 66.51?

patent burrowBOT
olive violet
#

How we got 66.51?

glacial perch
#

hi! I'm taking over this thread.

#

can you clarify your question? you want to know who was the VTA ($6.65) was computed?

olive violet
#

Yes

olive violet
glacial perch
#

There are two items with taxes:

  • One item amount is $60. if you remove the discount there's $57 left, that is taxable. And $57 * 0.1 = $5.70
  • One item amount is $10. if you remove the discount there's $9.5 left, that is taxable. And $9.5 * 0.1 = $0.95
    => $5.70 + $0.95 = $6.65
olive violet
#

But on the left side you see VAT(10% on US$66.51)

#

How does the 66.51 comes?

olive violet
glacial perch
#

true, not sure why there's a $0.01 difference, probabblye due to some rounding somewhere.

olive violet
#

Okay cool, but are you sure there won't me more difference than 0.01?

glacial perch