Our app that is in development will have the following 2 IAPs set up:
$12.99/mo as an auto-renewable subscription.
$9.99/mo as an auto-renewable subscription (if you've entered an invite code).
Obviously if the user enters the invite code BEFORE subscribing, we can ping the Apple servers with the lower-price IAP.
But our issue is: We're (planning on) allowing users to enter the invite code whenever they want, including AFTER they're already a paying subscriber. That way we can offer the discount for any future months they're a subscriber within our app.
Has anyone done this? Is this possible? Etc...
Update 8/30/2015: Unless someone provides us with the knowledge / ability to do otherwise, we've come to the conclusion that it's NOT possible. We even reached out to Apple and they said there's no API for such thing on their end.
That being said, we're going with the following approach:
If a user subscribes BEFORE an invite code is entered, they're charged the higher of the 2 prices.
If a user enters a code while ALREADY subscribed, they must unsubscribe, then re-subscribe to obtain the lower price point.
If a user subscribes AFTER an invite code is entered, they're charged the lower of the 2 prices.
UPDATE 9/23/2016
there's something called Subscription Groups in iTunes Connect that Apple recently introduced with Auto-Renew subscriptions. A user is only allowed to subscribe to 1 of the subscriptions within a group at a time. Thereby allowing a user to shift between "tiers". This is a possible solution to those coming across this question in the future.