Skip to main content
Answer

How to recognize a trial or purchase

  • March 10, 2025
  • 3 replies
  • 134 views

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,

 

This post has been closed for comments

3 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 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
  • 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
  • March 19, 2025

Hi ​@CT4TuEI3,

I’m glad it worked!

Best,