Skip to main content

I’m building an iOS app with a backend providing user accounts. Not sure what the best practice to integrate it. 

Each user is supposed to have an active subscription (with a free trial in the beginning). I set this up in App Store Connect. 

The backend includes a webhook that is triggered by RevenueCat. When anything happens, I refresh the latest customer info and update the User table. 

In the iOS app, I use the RC API to retrieve the customer info and active subscriptions. I set the Transfer behavior to Block to make sure one subscription is good for one user account only. Whenever the user logs in, I updated the RC id with the proper user id. 

Do I miss something? How to properly handle Restore purchase?

Hey @Anh!

Sounds like you’ve got a good grasp on user accounts.

One thing I’d mention is that by using the Block restore behavior, you’ll prevent users from accessing their subscription purchase if they lose access to their account (so you’ll want to be sure you’re ready from a customer support perspective to handle this case).

I’d recommend checking out our Identifying Users doc for more information about identity logic: https://docs.revenuecat.com/docs/user-ids

 


Reply