Skip to main content

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.

 

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. 


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


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