#nakasho
1 messages · Page 1 of 1 (latest)
I heard that STRIPE handles prices to three decimal places. How do I calculate the price in Japan?
JPY is a zero decimal currency: https://stripe.com/docs/currencies#zero-decimal
For example, to charge ¥500, provide an amount value of 500.
So you have to use an integer (like 500) and not a float (like 500.5).
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?
Can I just use "course.price" as it is?
What's the value ofcourse.price?
1400
There is no decimal point in Japanese yen.
However, in addition to commodities, there are also application fees. Therefore, a decimal point may occur.
Then yes you can directly set 1400 in the amount and you will get a ¥1400 price.
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
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),
what are you expecting them to be?
Thank you . I'm good to go now.
let me know if you need any more help