Skip to main content
Solved

Get original price and discount price for an in-app-purchase product (not a subscription product)

  • April 22, 2023
  • 1 reply
  • 869 views

Forum|alt.badge.img+1

I want to give my customers a limited period discount for the lifetime product in my app, and I want to show both the original price and the discount price for that product in the paywall so that my customers would know how much they could save if they purchase now. 

I have configured a price change on App Store connect for this IAP product, and I wonder how I can get the original price and the discount price? It seems that the `package.storeProduct.localizedPriceString` gives me the discount price and I didn’t find a way to get the original price.

 

Best answer by sharif

Hello,

Since you’re changing the price of the product itself there is no way to get the original price. Basically you have changed the original price of the product to be the new discounted price so Apple returns the discounted price in package.storeProduct.localizedPriceString. You may have to hard code this into your app although that might be difficult to localize.

As an alternative you can create a new lifetime product at the discounted price and show that in your app for a specific time period. That way you can compare the sale product to the full price product. Take a look at our Offerings guide to see how you can use our current offering feature accomplish showing the discount product for a limited amount of time.

View original
Did this post help you find an answer to your question?

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • Answer
  • April 26, 2023

Hello,

Since you’re changing the price of the product itself there is no way to get the original price. Basically you have changed the original price of the product to be the new discounted price so Apple returns the discounted price in package.storeProduct.localizedPriceString. You may have to hard code this into your app although that might be difficult to localize.

As an alternative you can create a new lifetime product at the discounted price and show that in your app for a specific time period. That way you can compare the sale product to the full price product. Take a look at our Offerings guide to see how you can use our current offering feature accomplish showing the discount product for a limited amount of time.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings