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?