New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Add a utility for formatting currency amounts #1086
Comments
@Dretch Thank you for reaching out about this. We've definitely heard this before but it's not something we have considered implementing for now. Right now we recommend that you cache this information yourself, based on this article though it's definitely not easy to scale this as we add new currencies. We're also working on some currencies with 3 decimals which will change the approach in the future too.\ For now, I've tagged this as future though I don't think it would happen in the near future! |
Stripe stores currency amounts in the smallest unit, but this is not suitable for showing to a user because they are used to seeing major units - e.g.
USD 10.50
.The computation for what to show to a user will differ depending on the currency in question:
GBP 5000
should display asGBP 50.00
.JPY 5000
would be displayed asJPY 5000
.It would be helpful if the knowledge about what to do in order to display different currencies could be encapsulated inside of the Stripe Java library, so that it does not have to be re-invented by users.
Thanks
The text was updated successfully, but these errors were encountered: