Skip to main content
Answer

Need help getting Intro Offer prices

  • August 8, 2025
  • 1 reply
  • 57 views

Forum|alt.badge.img+2

I’m using the RevenueCat KMP SDK and have a weekly subscription that includes an introductory offer.
I want to display both the regular price and the introductory offer price in my UI.

How can I retrieve both prices using the SDK?

Best answer by guilherme

Hey ​@Md-Atif,

You can get both the regular and introductory prices from the StoreProduct in the KMP SDK. Something like this should do:

val offerings = Purchases.sharedInstance.getOfferings()
val package = offerings.current?.weekly ?: return
val product = package.storeProduct

val regularPrice = product.price.formatted // the product price
val introPrice = product.introductoryDiscount?.price?.formatted // the intro discount

println("Regular: $regularPrice")
if (introPrice != null) {
println("Intro: $introPrice, then $regularPrice/week")
}

For more detail on StoreProduct and its fields, see: https://revenuecat.github.io/purchases-kmp/models/com.revenuecat.purchases.kmp.models/-store-product/index.html#-596915275%2FProperties%2F1207467509

This post has been closed for comments

1 reply

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • Answer
  • August 12, 2025

Hey ​@Md-Atif,

You can get both the regular and introductory prices from the StoreProduct in the KMP SDK. Something like this should do:

val offerings = Purchases.sharedInstance.getOfferings()
val package = offerings.current?.weekly ?: return
val product = package.storeProduct

val regularPrice = product.price.formatted // the product price
val introPrice = product.introductoryDiscount?.price?.formatted // the intro discount

println("Regular: $regularPrice")
if (introPrice != null) {
println("Intro: $introPrice, then $regularPrice/week")
}

For more detail on StoreProduct and its fields, see: https://revenuecat.github.io/purchases-kmp/models/com.revenuecat.purchases.kmp.models/-store-product/index.html#-596915275%2FProperties%2F1207467509