#stone_best-practices

1 messages · Page 1 of 1 (latest)

sour estuaryBOT
#

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

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

hollow cargo
#

Hi there 👋 I just want to acknowledge your question. I'm working on other threads and will get to yours soon!

rain forge
#

Thats interesting, so looking at the price i mention which is in US Dollar, shouldnt it be rounded up to 10.30 on stripes side ? like in this example here https://docs.stripe.com/billing/taxes/tax-rates?item-or-group-level=line-item-level#rounding The first second one has a price for $4.5455 which is rounded up to 4.55
We have $20.59 with 50% discount which results in $10.295 which i would assume to restult in 10.30, in stripe i can see it still has $10.29 open though

#

Does stripe just cut decimals for the whole invoice ?

hollow cargo
#

Will you be able to share with me the invoice ID that's showing $10.29?

rain forge
#

I have the invoice number is that gonna work out ?
8NSOESGU-0003

#

Wait does stripe round up discounts and then apply them ?

hollow cargo
#

I will need the Stripe account ID as well as I won't be able to look up using the invoice number alone. If you don’t mind, could you share your account id? You can find your account id by logging in to https://dashboard.stripe.com/settings/account . It'll have the prefix acct_

rain forge
#

acct_1JEIXKJMuPhqEMci

hollow cargo
#

this is the invoice: in_1RnXwdJMuPhqEMciH4by4cmQ give us awhile to take a look at it

#

Okay so the rounding is actually happening for this line item: VIP Discord (All-Access)

#

Firstly, when there's discount on the invoice, the invoice is applied to each line item, the calculation is:

  • 19.99 * 0.5 = 9.995 ~ 10.00 (this is rounded to $10.00)
  • 0.6 * 0.5 = 0.30
sour estuaryBOT
hollow cargo
#

the invoice total is then calculated from the subtotal like 20.59 - 10.30

#

i hope this clarifies!

hollow stratus
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

rain forge
#

Ok so we have to calculate the discount per line item not the total

hollow stratus
#

Yes.

rain forge
#

And for discounts is bankers rounding used or round half up ? So let's say we have a discount of 10.295 I guess it's rounded to 10.30 like in our case so rounding half up instead of bankers rounding

hollow stratus
#

It's rounding Up

rain forge
#

And for the grand total on the invoice also rounding that up or bankers rounding at that point ?

hollow stratus
#

Yeah AFAIK, in Stripe we use the rounding Up