Skip to main content
Question

How to get the price of an offer code discount?


Forum|alt.badge.img+2

I am working on my paywall which will detect when a customer purchased an older version of my app so that I can offer them a 50% discount or a free period on the subscription of the new app, depending on when they purchased the old app. 

I’m trying to figure out how to get the prices I’ve set on the offer codes that I will use. I’ve got a button that will take the user to the App Store to complete the purchase and when they come back from the App Store, I’ll sync their purchase and dismiss the paywall. 

Right now for the 50% discount offer, I’m just diving the subscription price by 2. However, Apple’s offer codes don’t work like that. You have to select specific prices for each offer code. I do display the original subscription price and also a “Your price: $24.99” label just below the button that takes them to the App Store to complete the purchase.

But I realize now that the prices I display will be wrong because it’s not always a divide by 2 price. For example, one of my prices is $44.99 USD per year. But the offer code did not let me choose a $22.49 price. I had to choose either $19.99 or $24.99. 

I just want to be able to show the user an accurate price before they click on the button that takes them to the App Store to complete the purchase.

Is there anything in the RevenueCat SDK that would let me get the price for the specific offer code?

12 replies

I am wondering the same thing.

I am considering adjusting the AppStore prices to fullfil at least my promise of 20% discount per country. But it’s a lot of manual work.

It would be nice to be able to get the exact discount dollar amount to display it to the user before redirecting to AppStore.


Forum|alt.badge.img+2

Yes, I figured RevenueCat would be able to provide this information. There is a getPromoOffers function which I had hoped would do this, but I don’t think it does.


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • February 9, 2025

There is a chance that I misunderstood your question - but what you could also do is depending on your app version is show the user a completetly different subscription.

So you would have 2 different subscription product in 2 different subscription group. One is used for the newer app version and one is used for the old app version. Would that work?


Forum|alt.badge.img+2

I’m not sure that would work for me because first of all, I wouldn’t want the alternate list of subscriptions to be visible by anyone else. And I think you’d be able to go to the App Store to see the list of those subscriptions. 

Second, I want the upgrade discount to be for a specified period of time, not in perpetuity. 

But that was an interesting idea.

Basically all I want is to be able to give a discount to existing customers for a period of time, but I want to show them the exact value of the offer code that will be applied when they click the button to get the discount. I show them the regular subscription price, but then also want to show them what their price will be after the discount. 

I can’t see a way yet to get true price of the discount with the RevenueCat SDK.


Forum|alt.badge.img+2

This would be so much easier if Apple allowed you to specify a percentage discount rather than a fixed price per offer code.


Forum|alt.badge.img+2

According to Apple’s help pages, there is a way to get the subscription offer code prices:

 

https://developer.apple.com/documentation/appstoreconnectapi/get-v1-subscriptionoffercodes-_id_-prices

 

https://api.appstoreconnect.apple.com/v1/subscriptionOfferCodes/{id}/prices

 

I wonder if RevenueCat may be doing that? Or is it easy enough to just call that from within my app? Not sure if you need to have your own server. I suspect there’s all sorts of authentication and whatnot you have to do first before calling the web request.

 

Or I wonder if there’s a way to do it directly with StoreKit? I hunted around for a while but didn’t find anything other than getting the promotional offers, which are different than offer codes.


Forum|alt.badge.img+2

@revenuecat Do you have any idea about this? Should I be sending this to your support channel instead of the forum here?


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 310 replies
  • February 21, 2025

Hey ​@Brendan Duddridge,

Let me dig into it and get back to you!

 

Thanks,


Forum|alt.badge.img+2

@joan-cardona Awesome. Thanks!

For now I’m just telling the user to tap/click the button to see what their actual price will be.

I haven’t yet published my app, so it’s still all in the testing phase at the moment, so there’s still time. But would love to be able to tell the user what their discount price will be before they click/tap the button.

Thanks!

Brendan


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 310 replies
  • February 27, 2025

Hi ​@Brendan Duddridge,

It’s not possible to get the price of the offer since that’s all done from Apple side and they don’t expose it.

Say that, you could achieve the same behavior using custom attributes. You could set a custom attribute for the user from app A and then show them a different offering using targeting, with the discount you want to give. Since that would be a new subscription, you’d be able to get the price and display it in your app. And it’s also more robust than Apple Offer Codes.

Let me know if that works!


Forum|alt.badge.img+2

Hi ​@joan-cardona

Thanks for your solution. That’s very interesting.

So with different subscriptions, that would mean that I can’t have this offer be for a limited time. Currently my offer code is for 50% off for the first year or the first 6 months free, depending on when you purchased the previous version of my app. Then after that it’s the regular full price.

 


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 310 replies
  • March 5, 2025

Hi ​@Brendan Duddridge,

If you have them in the same subscription group, users might be able to see it when they manage their subscription through the AppStore but you can always hide it from the app. Would that be enough?

Best,


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