#kennyjack_api

1 messages ยท Page 1 of 1 (latest)

ornate vesselBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

desert fjord
#

sorry, there are some mistake in my question

For upcoming invoice API, is discount code allow to applied on all items WITHOUT define in each item?

wanton snow
desert fjord
#

does my request req_NYqaGGXwwqulpx the discount field is in invoice level?

wanton snow
#

yes, that request used the top-level discounts field

desert fjord
#

Thanks for comfirming. Please hold on awhile because I've question on the response return. I will attach the response here too ๐Ÿ™

wanton snow
#

sounds good! yes, thanks in advance for sharing the response

desert fjord
#

Thanks for waiting. Here the response
FYI, I have product price $1800 which is tax-inclusive. Then i applied the discount 50%. The tax rate is 9%

My question why the lines.data.0.amount_excluding_tax = 172569 & the lines.data.0.tax_amounts = 7431 and the taxable amount already factor in the discount.

My expected value of lines.data.0.amount_excluding_tax = 165138

wanton snow
#

the tax behavior (inclusive/exclusive) of the tax rate is relevant here:

When tax rates are inclusive, Stripe Tax applies discounts to the original amount first. Then, we recalculate taxes based on the remaining amount. This reduction has the side effect of reducing the tax amount due.

https://docs.stripe.com/billing/taxes/tax-rates#inclusive-tax-discount-example

the tax rate used here is inclusive (txr_1S7WA3ArTeYcLw6yE0LNtQ7G)

desert fjord
#

I see, i didn't noticed that. Thanks for the info

#

That greatly help and clear my doubt

wanton snow
#

no problem of course, happy to help!

ornate vesselBOT
potent cloud
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

desert fjord
#

Hi, I have follow up question

potent cloud
#

sure...

desert fjord
#

Is that possible that the amount_excluding_tax always show the amount as tax-exclusive without factor in the discount?

potent cloud
#

I'm not sure I understand the question

#

the discount is applied before the TAX

ornate vesselBOT
desert fjord
#

Let me rephrase and slowly go through

desert fjord
ornate vesselBOT
desert fjord
exotic marten
#

Hi there. I'll take a look

desert fjord
#

Thanks

exotic marten
#

To clarify: on an invoice with a discount, you want to be able to retrieve the non-discounted amount?

exotic marten
#

So the amount_excluding_tax in this case is the original amount for the line item, minus the tax after discounts. That's just how line items work here.
If you need the amount excluding tax, that doesn't take the actual tax amount to be paid into account, you would have to calculate this yourself.

#

I would also note that the GET /v1/invoices/upcoming endpoint was deprecated earlier this year, and we would recommend using the POST /v1/invoices/create_preview endpoint (API docs) which may have some additional fields

desert fjord
#

Let me spend some times to try it out

#

Can i know when will this endpoint be removing?
I would also note that the GET /v1/invoices/upcoming endpoint was deprecated earlier this year,

exotic marten
#

There are currently no plans to remove it, but it won't be available when using newer Stripe API versions

desert fjord
#

I see thanks. I will take not on this

desert fjord
exotic marten
#

Taking a step back, can you share what you're looking to do with that amount_excluding_tax value?