#tgalanis_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1263491295578427413
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
hi!
just to clarify I can of course calculate it myself from the tax_rate percentage but I want to get stripe's rounding
Yeah I think you have to calculate this yourself -- don't think we provide this anywhere in the API but checking
Ah okay you should be able to just use line_items.data.amount_tax and line_items.data.amount_subtotal: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-line_items-data-amount_subtotal
If you add those together it should give you the total without discount
let me think because I think I discarded this idea previously for some reason
you mean subtracting them but his yields a bigger price since the amount of tax i am subtracting is smaller due to the discount
Oh because the tax amount is calculated based on the discounted amount
Right
Then yeah, you would have to calculate yourself
yea figured as much but the topic is complicated so it might be that I have enough information to obtain it from adding and subtracting, I will see. Thank you very much for the help though !