#maxime1992
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- maxime1992, 1 day ago, 12 messages
- maxime1992, 5 days ago, 32 messages
- maxime1992, 6 days ago, 30 messages
Hmm, what are you trying to do?
I get a given amount to pay, for example 550.
If it's USD, it'll mean $5.50, if it's ¥ it'll mean ¥550
I'm trying to understand in the UI how I should display and use that, and whether I need to divide the amount or not
Ah, got it. Well you'd need to source that data from elsewhere. If you're building a web app you can just leverage the Intl API to handle the formatting: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
Pass it the amount and currecy, it handles the reset
That makes sense, cheers
Actually, it doesn't work how you thought, does it?
If I give 500, in euros I want to get 5, but in yen I want to get 500.
There's additional formatting issues you can use to control decimal places etc. Look at the MDN docs
Are you referring to maximumSignificantDigits? Because if that's it, then we go back to my original question. How do I know the number of significant digits for a given currency 🤷♂️
Well, you don't. Not from our API anyway
So, any guidance on how to display an amount based on a currency? Seems like a pretty basic question that should be part of the documentation