#1cyFir3-

1 messages · Page 1 of 1 (latest)

quick mist
#

Hi, looking

#

Can you give me the Payment Intent Id (pi_xxx)?

jagged fractal
#

pi_3LNssGL9KGvziCdn08wMPbqt

quick mist
#

Yes you were right it's 0.085, but 1.04 is also 1.044 actually

#

Putting it down:

#

As if the charge was 16:
((16 * 3.4) + 50) / 100 = 1.044

As if the charge was 13.5:
((13.5 * 3.4) + 50) / 100 = 0.959

So the gap is 1.044 - 0.959 = 0.085 ----> 0.08

jagged fractal
#

When I calculate like that, I also have another incorrect case. pi_3LNbTmL9KGvziCdn0VRYJ2zQ

Here is the calculation.
((10 * 3.4) + 50) / 100 = 0.84

(2.5 * 3.4) / 100 = 0.085
0.84 - 0.085 = 0.755

The actual fee refund is 0.75 which should have been 0.76.

quick mist
#

Why? I think 0.755 should be 0.75 for round down

#

Btw don't calculate on 2.5

#

calculate on the "as if". As if full charge (without rounding) and as if captured charge (without rounding) and take the gap

#

((10 * 3.4) + 50) / 100 = 0.84

((7.5 * 3.4) + 50) / 100 = 0.755

jagged fractal
#

So the rounding is not up but down?

#

What if the result is 0.689, is it 0.69 or 0.68?

quick mist
#

should be 0.69. I meant it's down if it's 0.xx5, but up for 0.xx6 to 0.xx9

jagged fractal
#

I see but I tried another case.
(((325.16) * 3.4) + 50) / 100 = 11.55544
If I round it down, it should be 11.55 but the actual is 11.56

quick mist
#

11.5554 should be 11.56, isn't it? because 11.5554 is technically > 11.555

jagged fractal
#

Ok, I've got it. Now, I understand how it works. Thank you so much for your explanation.