Create and Track Offer Codes for Your iOS App
Let's journey through set up, redemption, and tracking

Offer Codes are a type of iOS Subscription Offer that allow you to present free or discounted prices for auto-renewable subscriptions through single-use redeemable codes. Depending on how they’re configured in App Store Connect, offer codes can be presented to new, existing, or lapsed subscribers to drive further engagement with your app.
Note that in order to redeem your offer codes, subscribers must be running iOS 14+ or iPadOS 14+. MacOS is currently not supported.
How do I set up Offer Codes for a subscription?
You can configure and generate offer codes for a subscription in your app settings in App Store Connect (in the Subscription Pricing menu for your product). Check out RevenueCat’s guide or Apple’s Help Center article for help with this process.
Once you’ve generated and downloaded the offer codes, you’re responsible for distributing them to subscribers through your own systems (such as through email or other marketing campaigns). You can either share the codes directly or distribute URLs with the codes embedded to your subscribers.
Keep in mind that offer codes expire six months after they’ve been generated unless you set an earlier expiration date (or if you deactivate them, in which case they will expire immediately—see this Help Center article to learn more about deactivating offer codes).
Is there any additional setup required in RevenueCat?
The only configuration RevenueCat needs is a subscription key, which is required to validate API requests associated with Apple offer codes. Check out our guide on how to download a subscription key from Apple and upload it to RevenueCat.
How are Offer Codes redeemed?
Redeeming on the App Store
Subscribers can redeem offer codes directly on the App Store (through the Redeem Gift Card or Code page in their account settings), or you can provide them a URL with the code embedded. This will take them to the App Store flow with the code already entered.
The URL template looks like this:
https://apps.apple.com/redeem?ctx=offercodes&id={app ID}&code={offer code}
If the subscriber doesn’t have your app installed, the app will be installed automatically as part of the redemption flow.
Redeeming from your app
If you choose to support it, subscribers can also redeem offer codes from your app. On a paywall, for example, you can add a button called Redeem Offer, which will call the function presentCodeRedemptionSheet()
. We expose this function through our SDK on all platforms, but the code will only present the sheet on iOS devices.
This function call will guide the user through a redemption flow similar to the one on the App Store, and is dictated by Apple, not by your app or by RevenueCat. You can see a sample UI for this flow below (from Apple’s docs):

How should my app respond to these purchases?
These redemption flows occur within an external interface dictated by Apple, so a transaction will be placed on the SKPaymentQueue
to be finished by your app. For this reason, Apple recommends initializing a transaction observer as soon as your app launches. Fortunately, RevenueCat’s SDK takes care of this for you by attempting to finish any pending transactions whenever the app is launched or foregrounded.But there is a caveat with using presentCodeRedemptionSheet():