I have setup a enterprise and team account system in my flutter ios and android app. I have used AWS Cognito for the user accounts and i am linking the enterprise accounts user_id to their purchased subscription in revenue cat. Now when an enterprise user creates a team account i have it so that a lambda function uses the rest api from revenue cat to add the team accounts user id as an alias of the enterprise accounts subscription. This all works correctly and gives the team account the same subscription as the enterprise account.
Now here is where the problem comes in. If an enterprise user deletes a team account I can’t find a way to also delete that alias for the team account that I created from the lambda function that calls revenue cats rest api. Since there is a limit of 50 aliases on a subscription this means if the enterprise user created 50 team accounts and deleted all of them these aliases would still exist and they can’t link anymore accounts to there subscription anymore. This is why I need to remove an alias each time the team account is deleted.
What are my options, does anyone know how can I fix this problem?
Question
Team Accounts Associated with an Enterprise Accounts Subscription using Aliases? How to Delete an Alias?

This post has been closed for comments
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.