Skip to main content
Question

Using Customer Attributes for Restoring User Data After Reinstall or Device Change

  • May 1, 2025
  • 1 reply
  • 26 views

Forum|alt.badge.img

I'm building a Flutter mobile app that uses RevenueCat with anonymous user IDs β€” there is no authentication or login system.

On first app launch, I store the user's anonymous appUserID securely. If the user makes a purchase, I save their credit balance and subscription status in Firebase, keyed by this RevenueCat ID. I also call setAttributes to store this ID (e.g. firebase_user_id) as a RevenueCat customer attribute.

Now, my question is:

If the user uninstalls the app or switches to a new device (but uses the same Apple ID or Google Play account), and then taps restorePurchases() (which creates a new anonymous App User ID), will the customer attributes from the original App User ID be automatically synced and transferred to the new user?

I would like to rely on that attribute (e.g. firebase_user_id) to reconnect the user with their Firebase data β€” without requiring login or using a custom App User ID.

Alternatively:

Is there any way to access the original App User ID (i.e. the ID that RevenueCat links from the receipt during restore) from the new anonymous user after restorePurchases() is called?

If customer attributes are not synced and transferred, can I use the originalAppUserId returned in CustomerInfo after a restore as a reliable way to locate and restore the user’s record from Firebase?

 

In this case, what is the recommended way to persist user identity and reliably restore their credit balance and subscription status from Firebase after reinstall or device change β€” while remaining fully anonymous and not requiring login?

This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 584 replies
  • May 5, 2025

Hi, when purchases are restored only the transactions are transferred, not the subscriber attributes. To transfer subscriber attributes between customers, you should listen to our TRANSFER webhooks and manually copy the attributes between the users by using our API (GET /subscribers to read the attributes on the first user and POST /attributes to add the attributes on the second user.) 


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