#navaie_api

1 messages · Page 1 of 1 (latest)

floral parcelBOT
#

👋 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/1296097252024123422

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

arctic tusk
#

Hello
I can try take a look but my guess is you may need to reach out to our support team about this as they're more familiar with tax codes and taxes in general

#

can you share the checkout session ID?

hoary lodge
#

I have the payment ID, does that help?
pm_1QAWgBBurMSVGz9Et40DkGOB

#

not sure I have the checkout session ID saved somewhere atm

#

ah, probably this one:
cs_test_b1Mj6SQSDXB1Li1boXPedx4xmlrMKffs3qQr3lksrKHuChsUwpjRYbjl86

#

I'm creating a session on the fly, as the products are unique to every user

#

Somewhat like this:
await stripe.checkout.sessions.create({
line_items: [
{
price_data: {
currency: "eur",
tax_behavior: "exclusive",
product_data: {
name: Photobook Order ${order.orderId},
images: [thumbnailUrl],
tax_code: "txcd_20090028",
},
unit_amount: Math.ceil(bookPrice * 100), // Book price in cents
},
quantity: 1,
},
}

arctic tusk
#

Hmm so there are two line items in the session you shared with two different tax codes

hoary lodge
#

Correct. One photo book, once the shipping cost

arctic tusk
#

I believe we're just using shipping cost tax code to calculate tax here

hoary lodge
#

But it also happens when I push a total price and 1 item, instead of 2

#

before I added the shipping cost, I had the same issue

#

cs_test_a1MdN4X8mCKf6aZRHuwN7JJfdTdeYYEAi1mBTAJgUkEOIjYul4c7FwyY3J

#

That's a new one with only the book, same issue

#

So I would expect Stripe Tax to be able to differentiate between the high Tax bracket (21%) and the low Tax bracket (9%) based on the tax_code I add to the product. However, it doesn't seem to do so.

arctic tusk
#

What amount were you expecting?

hoary lodge
#

9% tax rate

#

±1.81 EUR

arctic tusk
#

by default

hoary lodge
#

let me see

#

I mean, I can add that, as in the screenshot, but that kind of kills the whole use of Stripe Tax, because I'd have to add this for every location in which I have customers, right? That's worldwide..