#mounirmtl-account-support
1 messages ยท Page 1 of 1 (latest)
mounirmtl-account-support
@lofty spire :question: Have a non-technical question, account issue, or need one-on-one support? We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact
I was more wondering if there's an API or a property we should check somewhere
I don't really understand the question I'm really sorry ๐ฆ
For example we're displaying sales amount, shipping cost, taxes amount and total amount on checkout and we're using stripe taxes to handle all the calculation.
However depending if you're in north America or in Europe, you'd display the sales amount tax exclusive for the former and tax inclusive for the latter.
Stripe checkout handles that pretty well.
I was wondering how could we reproduce this behavior on our checkout
๐ Have you seen this doc yet? https://stripe.com/docs/tax/custom
We have some tax-specific APIs that would allow you to calculate tax and display it in your own checkout flows
Yes that's what we're using for tax calculation. But it doesn't tell how amouts should be displayed to users, whether it should be tax inclusive or tax exclusive
The response from the calculation API does have attributes that show both the inclusive or exclusive tax amounts:
Yes it does. But how do I know which one to display?
I assume you'd show whichever one(s) were non-zero, but it does depend on your specific display - generally I'd use amount_total to display the total after taxes and then I'd add up tax_amount_inclusive and tax_amount_exclusive and display that as the tax
For instance:
-
in the US or in Canada, you'd display tax exclusive amounts, the taxes and then the total and one would expect that summing the sales amount and the taxes would equal to the total amount.
-
in France, you'd display the tax inclusive amounts and then the taxes and never display the tax exclusive amount.
What I'm wondering is, should I have my own logic per country or is there a way, with stripe, to know what is the expected way to display billing amounts?
Why can't you just check both tax_amount_exclusive and tax_amount_inclusive and display whichever one is non-zero? That way you're relying on Stripe to correctly calculate the tax and tell you whether the tax is inclusive/exclusive and you don't need any logic based on country?
Why can't you just check both tax_amount_exclusive and tax_amount_inclusive and display whichever one is non-zero?
Hmmm I'm not sure I understand that part. Are those fields mutually exclusive? Like iftax_amount_exclusiveis non zero we should display amounts without taxes and iftax_amount_inclusiveis non zero we should display amounts inclusive of taxes?
They're not strictly mutually exclusive (I believe it's possible to have both an exclusive/inclusive tax rate on the same purchase), but don't you want to be relying on Stripe to tell you how much tax is actually owed on the payment? I assume you'd want to display both if both of them are set
don't you want to be relying on Stripe to tell you how much tax is actually owed on the payment?
Oh I do. And i rely on stripe for telling me the tax owed and the total amount to charge.
What I don't know is say we have $100 worth sales.
And there is $15 worth of taxes on that sale.
Depending on the country, I'll have to either display
Sales Amount $100.00
Taxes $15.00
Total Amount $115.00
or
Total Amount: $115.00
Taxes: $15.00
In both cases the amounts come from stripe calculation. But how do I know which one to display?
Ah I see - your issue is really with how to display the subtotal, right?
Yes.
(sales amount)
I think what you can do then is just have a check for tax_amount_exclusive > 0 and then display Sales amount as amount_total - tax_amount_exclusive
Sorry lol. It's not really how to calculate the sales amount.
It's more about whether I should display it or not
I know stripe is using the currency to determine if a price is tax exclusive or inclusive.
So I was wondering if there's a way Stripe could tell us if for that connected account Price should be dispayed tax inclusives or tax exclusives
Yeah you'd only display it if tax_amount_exclusive is non-zero?
I don't know ๐ That's what I'm asking ๐
Yeah that's what I've been suggesting from the start - only display it if it's non-zero
Oh I may have misunderstood you since the very beginnning
Are you saying that I should not think about the amounts at all and just do something like:
Sales Amount = taxCalculation.TotalAmount - TaxCalculation.TaxAmountExclusive
Taxes = taxCalculation.TaxAmount
Toatl = taxCalculation.TotalAmount
if taxCalculation.TaxAmountExclusive is == 0, I hide the Sales amount?
yup!
Interesting.. Thanks for the help.
๐ sorry it took a while to sort through that!