Skip to main content
Solved

How to recognize a trial or purchase


Forum|alt.badge.img

Hello!
I'm using iOS SDK and I need to send my event reporting metric depending on the purchase or start of a trial period. Can you please tell me if there is a property based on which I can implement the functionality I need? If someone has some developments in the form of Swift code I will be very happy to help.

Best answer by joan-cardona

Hi ​@CT4TuEI3,

You can check `PeriodType` in the entitlement info to know if the user has an active entitlement due to a trial or a paid subscription.

PeriodType is an enum that has 3 possible options:

  • 0 normal
  • 1 intro
  • 2 trial

The entitlement can be found in the CustomerInfo object so you can see the value at any moment.

Best,

 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

3 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 408 replies
  • Answer
  • March 12, 2025

Hi ​@CT4TuEI3,

You can check `PeriodType` in the entitlement info to know if the user has an active entitlement due to a trial or a paid subscription.

PeriodType is an enum that has 3 possible options:

  • 0 normal
  • 1 intro
  • 2 trial

The entitlement can be found in the CustomerInfo object so you can see the value at any moment.

Best,

 


Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • March 13, 2025

Hey, ​@joan-cardona!

Thank you so much for your reply!
This is just what I needed and helped me solve my problem.


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 408 replies
  • March 19, 2025

Hi ​@CT4TuEI3,

I’m glad it worked!

Best,


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