Skip to main content
Solved

Purchasing product does not ask for Offer Code on iOS

  • 15 December 2021
  • 3 replies
  • 205 views

George Brandes
Forum|alt.badge.img+2

I have a app on the App Store with offer code for one subscription. If I send the user the URL with the code there is no problem. However. if a user installs the app then they can tap on the subscription that requires an offer code and there is no prompt to enter a code. They end up getting a free 6-month subscription. I want to use the offer code to limit who can purchase subscriptions. 

What am I missing? Is there a sample of offer code processing? I thought this would be all handled in the App Store since they provided the codes.

Best answer by ryan

However, if offer codes are used to provide a discount then why when I purchased without the code did I get a free 6 month subscription instead of paying the normal price. 

Maybe that account had already redeemed an offer code before purchasing? Or there’s a 6mo trial configured on the product? Not sure exactly what happened in that instance but just because you’ve generated Offer Codes for a product does not mean that anyone who purchases the product automatically redeems an Offer Code.

 

I don’t see how the app can display the offer code redemption sheet when the app doesn’t know what subscriptions have an offer code.  Do we have to rebuild the app every time the subscriptions turn or or off offer codes? Or go to a server to check?

The redemption sheet is a system UI with just a text field to enter the Offer Code I believe. Customers don’t need to select which product they want to redeem a code for. If you wanted to have some server-side config to decide whether or not you should display a “Redeem Offer Code” button in your UI that could be an option, but customers will only ever be able to redeem an offer if they have received a code somehow first.

If you plan on giving out lots of codes, probably easiest to just always display an option for them to enter it via the redemption sheet. Alternatively, you could choose to only send codes via the URL and and not worry about anything in your UI.

 

It sounds like you may be wanting to build a flow where customers first select an item, then they have an option of entering a discount code (like shopping online). The Offer Codes from Apple work a little different where you need to enter the code first, and then you’re presented with the particular product discount it’s good for. The linking of code → product is done in App Store Connect. 

View original
Did this post help you find an answer to your question?

3 replies

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • December 15, 2021

Hey @George Brandes!

Setting up an Offer Code on a product does not mean that the product can only be purchased with a code. Offer Codes are used to offer discounts to a regularly priced subscription product - they do not prevent the customer from purchasing the product without a code. Sorry for any confusion there! 

 

 I want to use the offer code to limit who can purchase subscriptions. 

In this case you can have a button to “Redeem Offer Code” in your app, and call Purchases.shared.presentCodeRedemptionSheet() to present the system UI for redeeming offer codes. See the “Redeeming an Offer Code” section of the offers docs for more info: https://docs.revenuecat.com/docs/ios-subscription-offers#2-redeeming-an-offer-code


George Brandes
Forum|alt.badge.img+2

Thanks for the reply. However, if offer codes are used to provide a discount then why when I purchased without the code did I get a free 6 month subscription instead of paying the normal price. 
 

I don’t see how the app can display the offer code redemption sheet when the app doesn’t know what subscriptions have an offer code.  Do we have to rebuild the app every time the subscriptions turn or or off offer codes? Or go to a server to check?


ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • Answer
  • December 15, 2021

However, if offer codes are used to provide a discount then why when I purchased without the code did I get a free 6 month subscription instead of paying the normal price. 

Maybe that account had already redeemed an offer code before purchasing? Or there’s a 6mo trial configured on the product? Not sure exactly what happened in that instance but just because you’ve generated Offer Codes for a product does not mean that anyone who purchases the product automatically redeems an Offer Code.

 

I don’t see how the app can display the offer code redemption sheet when the app doesn’t know what subscriptions have an offer code.  Do we have to rebuild the app every time the subscriptions turn or or off offer codes? Or go to a server to check?

The redemption sheet is a system UI with just a text field to enter the Offer Code I believe. Customers don’t need to select which product they want to redeem a code for. If you wanted to have some server-side config to decide whether or not you should display a “Redeem Offer Code” button in your UI that could be an option, but customers will only ever be able to redeem an offer if they have received a code somehow first.

If you plan on giving out lots of codes, probably easiest to just always display an option for them to enter it via the redemption sheet. Alternatively, you could choose to only send codes via the URL and and not worry about anything in your UI.

 

It sounds like you may be wanting to build a flow where customers first select an item, then they have an option of entering a discount code (like shopping online). The Offer Codes from Apple work a little different where you need to enter the code first, and then you’re presented with the particular product discount it’s good for. The linking of code → product is done in App Store Connect. 


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