Skip to main content
Question

KMP - Get Formatted Monthly Price

  • January 31, 2026
  • 1 reply
  • 32 views

Forum|alt.badge.img+4

Currently we only have two options:

  • price.formatted, which uses the period of the offer
  • dividing the price into monthly price, but without access to the currency symbol (only code is offered)

How are meant to display something very common like $60.00/year also shown as $5.00/month?

 

fun StoreProduct.priceFormattedMonthly(): String? {
return this.period?.valueInMonths?.let { months ->
val monthlyPrice = this.price.amountMicros.div(months).div(1_000_000).round(2)
return "${this.price.currencyCode}$monthlyPrice/ mo"
}
}

 

This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • February 10, 2026

Hi ​@chris-kasdn2137 thank you for this feedback, I passed this along to the team and they just added this in our most recent version of the SDK: https://github.com/RevenueCat/purchases-kmp/releases/tag/2.5.0%2B17.32.0