#Santiago Bouso
1 messages ยท Page 1 of 1 (latest)
hi, let me think about it
sounds like you want inclusive tax https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior
(above screenshot is for
const session = await stripe.checkout.sessions.create({
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
line_items: [
{price: 'price_xxx', quantity: 3},
],
discounts:[{coupon:"<20-off-coupon>"}],
mode: 'payment',
automatic_tax: {
enabled: true,
},shipping_address_collection: {
allowed_countries: ['IE'],
},
});
)
"above screenshot is for..."?
the screenshot is from a CheckoutSession I created using the code I posted
Ok!
So the taxes are being calculated automatically in this case
Based on? Business location?
that, and the customer location, I'd suggest reading though https://stripe.com/docs/tax/checkout
Wait, now that I'm looking carefully to your screenshot, that's not the expected result, that's actually my exact problem
The TOTAL should be 240 PLUS taxes
In your example, the total is 195.12 plus 44.88 taxes ===>> 240
What I need is 240 plus 44.88 taxes (or the corresponding value) ===>> 284.88
That was my original problem that made me ask here how to avoid that ๐ฌ
then you want 'exclusive' tax instead I suppose
Nice!
So, last one, where did you set, in your code, the exclusive tax configuration?
Or you set it when creating the prices?
On each price?
you set it when creating the Product
best to play around with it in test mode and follow the docs etc and let us know if you get stuck anywhere
Thank you very much
I'll do that ๐
Sorry for coming back, but after reading the docs, I have one last question: aren't we able to set a tax amount in a Checkout Session? I mean, not an auto calculated tax value, but a manually set value?
Hi, I'm taking over my colleague ๐
Hi, vanya!
There's another way of specifying taxes, a more manual one, called Tax Rates. You can find more here: https://stripe.com/docs/payments/checkout/taxes?tax-calculation=tax-rates
That sounds to be what I need, but for what I see, this Tax Rates are applied to the line items (inside a Checkout Session)
What I need is to apply Tax Rates to the whole Checkout Session, not to its line items
That was my original question/problem
Is that possible?
No, taxes are always calculated per line item.
So, in conclusion... if I want to apply taxes to the whole Checkout Session... the only way to calculate those taxes is automatically, using Stripe functionality for that
And there is no way to apply something like "Tax Rates" to the Checkout Session total value
Is that right?
Yes, that's correct.
Note, Automatic Tax is also calculated for to each line item individually, but you only enable it in one place.
Happy to help. Let me know if you have any other questions.