How to display price per month formatted to local currency?

  • 15 November 2023
  • 2 replies

Badge +5

Sorry for creating a duplicate of this, but it seems like the conversation stopped and maybe less details.

I wanted to open back up the conversation to get an idea how to clearly show a price per month to the user in their local currency format. I know the SDK gives me the product with a formatted price, and I also see a raw value as well. Taking that value to divide by the right number based on subscription length is what I want to build. It means that we need a map of packageType vs integers. Where to get a list of all possible strings. I created one one month and six month packages and see the values (MONTHLY and SIX_MONTH), what are all the possible values?
I see also a currency code like “USD” that maybe can use to derive a dollar sign. But how to do this for all possible scenarios/countries?
Is there maybe a better way to implement this inside the SDK?

2 replies

Userlevel 4
Badge +8


We do have a priceFormatter method, that you may find useful. We don’t have a very robust way to map this all out in the SDK at the moment, so most customers will build a dictionary themselves and use that for their preferred currency codes.


Badge +5

Is this available in react-native-purchases? Sorry not sure exactly how this can help. It will know the local currency format?