Skip to main content
Solved

Offer code for new users in ios 14(How can I test it)

  • 10 September 2021
  • 3 replies
  • 661 views

Forum|alt.badge.img+5

I want to grant premium access to some users with offer codes and present Redeem page with this method: 

Purchases.shared.presentCodeRedemptionSheet()

It works fine ,but:

After redemption how can I verify the results(e.g entitlement ,days remaining ,etc )

and how can I test it with in sandbox environment ,is it possible?

I have my appstore connect side configured but I need some recommendation on revenue cat please.

 

Best answer by tina

Hey @Alireza Nazer!

I don’t believe Offer Codes seem to work in sandbox :/ In the past when we attempted testing, Offer Codes always appeared as “expired” in sandbox. We recently added an offer_code field to webhooks (documentation still being worked on) that you can utilize to confirm entitlement, expiration date, etc. 

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

3 replies

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 338 replies
  • Answer
  • September 15, 2021

Hey @Alireza Nazer!

I don’t believe Offer Codes seem to work in sandbox :/ In the past when we attempted testing, Offer Codes always appeared as “expired” in sandbox. We recently added an offer_code field to webhooks (documentation still being worked on) that you can utilize to confirm entitlement, expiration date, etc. 


Forum|alt.badge.img+5
  • Helper
  • 6 replies
  • September 16, 2021

Hi @tina ,

Does that mean that there is a Webhook trigger for every offer code redemption from RevenueCat? What would be the event type in that case.? Where can I find more details about the event details.?

 

Thanks


tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 338 replies
  • September 27, 2021

Hey @Researchfin 

The offer_code field will be present for most webhook events. 

 

Does that mean that there is a Webhook trigger for every offer code redemption from RevenueCat? 

Yes!

What would be the event type in that case? 

INITIAL_PURCHASE We have an example JSON you can reference here: https://docs.revenuecat.com/docs/webhooks#events-format

Where can I find more details about the event details?

The webhook documentation has been shipped, you can see more information about the offer_code in this table: https://docs.revenuecat.com/docs/webhooks#subscription-lifecycle-events-fields

 


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