#maxime1992

1 messages · Page 1 of 1 (latest)

gritty wolfBOT
#

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.

paper epoch
#

Hmm, what are you trying to do?

violet bobcat
#

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

paper epoch
#

Pass it the amount and currecy, it handles the reset

violet bobcat
#

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.

paper epoch
#

There's additional formatting issues you can use to control decimal places etc. Look at the MDN docs

violet bobcat
#

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 🤷‍♂️

paper epoch
#

Well, you don't. Not from our API anyway

violet bobcat
#

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

paper epoch
#

I think I just gave you an answer really. Your requirements to customise the formatting depending on the # of decimal places would be custom, so you'd need to source currency data from somewhere, maybe a third-party API

#

This isn't really a Stripe question