Solved

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

  • 22 April 2023
  • 1 reply
  • 435 views

Badge

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.

 

icon

Best answer by sharif 26 April 2023, 21:23

View original

1 reply

Userlevel 5
Badge +9

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