#nakasho

1 messages · Page 1 of 1 (latest)

sterile marshBOT
eager pendant
#

Hi there!

#

What do you mean by "correct display of STRIPE charges"?

smoky ridge
#

I heard that STRIPE handles prices to three decimal places. How do I calculate the price in Japan?

eager pendant
#

So you have to use an integer (like 500) and not a float (like 500.5).

smoky ridge
#

So you don't have to assume cents, etc.
Does that mean I don't need the Math .round function or the toFixed function?
Can I just use "course.price" as it is?

eager pendant
#

Can I just use "course.price" as it is?
What's the value of course.price?

smoky ridge
#

There is no decimal point in Japanese yen.
However, in addition to commodities, there are also application fees. Therefore, a decimal point may occur.

eager pendant
#

Then yes you can directly set 1400 in the amount and you will get a ¥1400 price.

slow plinth
#

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

smoky ridge
#

Can you confirm that the application fee and product amounts are correct? Is this correct?

const fee = (course.price * 30) / 100;
        unit_amount: Math.round(course.price.toFixed(2)),
    application_fee_amount: Math.round(fee.toFixed(2) * 100),
slow plinth
#

what are you expecting them to be?

smoky ridge
#

Thank you . I'm good to go now.

slow plinth
#

let me know if you need any more help