Skip to main content

Using "Group ID" as App User ID in RevenueCat


Forum|alt.badge.img+4
  • New Member
  • 1 reply

Hi. There are groups in my app and the groups have a couple of members. If one of them pays for subscription, I change the group status and all the members in group can access premium contents.

 

Can I initialize the ‘group id’ instead of user id (firebase auth uid) ? Is it a good practice? Do I have to use aliases?

My code: await Purchases.setup(_api_key, appUserId: group.id);

 

 

4 replies

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

Hey @esp!

 

That should be fine to use a “Group ID” in place of an App User ID in RevenueCat. 

 

RevenueCat will keep the subscription status in sync against an provided identifier, so in this case the subscription status would be tied to the “Group”, not an individual customer, which sounds preferable for your use-case.

 

Keep in mind that things like Subscriber Attributes will also be at the group level, along with Customer Lists, etc.


Forum|alt.badge.img+4
  • Author
  • New Member
  • 1 reply
  • July 26, 2021

Thank you @ryan


Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • March 18, 2022

Hi @ryan , on that same note with group subscription, is it possible to have Revenue Cat check subscription status against group id in attributes instead of App User ID?  That way users in a same group can still show up in customer list and have their own attributes. 


ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • March 18, 2022

Hey @Vera subscription status can only be linked to an App User ID, you’re correct that Attributes and Customer Lists would be associated with a “Group” instead of a “Customer” if you go with this approach.


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