Skip to main content
Solved

Scenario: identified User + Device ID + syncPurchases + restorePurchases

  • January 29, 2026
  • 1 reply
  • 56 views

Forum|alt.badge.img

I am considering whether a unique device ID is suitable as user ID for my use case.

I came up with the following  subsequent scenarios / concept, can someone confirm or correct my understanding of how RevenueCat works?

----------------------------------------------------------------------------------------

Baseline

The App uses Device ID as RevenueCat User ID -> identified User.
The scenarios take place on iOS.

----------------------------------------------------------------------------------------

Scenario 1

User named Tim

  • installs App
  • on Device ID 1234ABC with
  • Apple ID tim.cook@apple.com
  • and makes a purchase in the App

Result: Receipt is stored with Apple ID, Purchase associated with Device ID is stored in RevenueCat

----------------------------------------------------------------------------------------

Scenario 2

Then, Tim

  • installs App
  • on another Device ID 5678DEF
  • with same Apple ID tim.cook@apple.com
  • and launches the App initially

Effects:

  • App initially calls syncPurchases once
  • Receipt is found with Apple ID
  • default: Purchase in RC is migrated from 1234ABC to 5678DEF

Result: Device 5678DEF has access to Purchase, 1234ABC is revoked access

----------------------------------------------------------------------------------------

Scenario 3

Then, Tim

  • clicks "Restore purchases"
  • on Device ID 5678DEF

Effects:

  • App calls restorePurchases
  • ???

Result: ??? is an Alias created ???

----------------------------------------------------------------------------------------

Scenario 4

Then, Tim

  • clicks "Restore purchases"
  • on Device ID 1234ABC

Effects:

  • App calls restorePurchases
  • Receipt is found with Apple ID
  • default: Purchase in RC is migrated from 5678DEF to 1234ABC

Result: Device 1234ABC has access to Purchase, 5678DEF is revoked access


 

Conclusions:

If I use the Device ID as a RevenueCat user ID, the user only will be able to use the unlocked purchases on one device at a time, even when logged in with the same Apple ID.
Is that correct?

What happens when calling restorePurchases on the device where the purchases already were restored using syncPurchases?

Best answer by Tarek

Hi Benjy,

Thank you for reaching out. I'm Tarek, from the support team, and I'll be happy to assist you.

Your assumptions on how the the transfers work with regards to syncing and restoring purchases is right, since at each step the "source of truth" is the Apple ID and its associated purchases.

However, we don't recommend using a device ID as user ID.

The reasons are the following:

  • The user ID is meant to be a stable identifier, representing the same user across multiple devices and platforms. It introduces an additional layer that allows RevenueCat to sync purchases of a given user, no matter where they performed this purchase (any device, any supported platform)

 

  • Setting a user ID to be the device ID could have unintended consequences. One of them would be the inability to sync purchases from the App Store to the Play Store and vice-versa. The reason is that this synchronization requires a stable, cross-platform identifier, since there's no way to query Apple's App Store on Android, and there's no way to query Google's Play Store on iOS. The user ID is not meant to be periodically changed.

 

  • If you really want to achieve the behavior you described, and your app is iOS only, not using a user ID would be the supported way to do it. You wouldn't have the ability to sync purchases on multiple platforms, but as long as your users stay on iOS and use the same Apple ID, they would have access to their purchases. Under the hood, RevenueCat will use "anonymous" user IDs. Unlike an explicitly defined user ID, anonymous user IDs are not meant to be stable.

I hope this is useful.

 

Best regards,

This post has been closed for comments

1 reply

Tarek
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • Answer
  • February 2, 2026

Hi Benjy,

Thank you for reaching out. I'm Tarek, from the support team, and I'll be happy to assist you.

Your assumptions on how the the transfers work with regards to syncing and restoring purchases is right, since at each step the "source of truth" is the Apple ID and its associated purchases.

However, we don't recommend using a device ID as user ID.

The reasons are the following:

  • The user ID is meant to be a stable identifier, representing the same user across multiple devices and platforms. It introduces an additional layer that allows RevenueCat to sync purchases of a given user, no matter where they performed this purchase (any device, any supported platform)

 

  • Setting a user ID to be the device ID could have unintended consequences. One of them would be the inability to sync purchases from the App Store to the Play Store and vice-versa. The reason is that this synchronization requires a stable, cross-platform identifier, since there's no way to query Apple's App Store on Android, and there's no way to query Google's Play Store on iOS. The user ID is not meant to be periodically changed.

 

  • If you really want to achieve the behavior you described, and your app is iOS only, not using a user ID would be the supported way to do it. You wouldn't have the ability to sync purchases on multiple platforms, but as long as your users stay on iOS and use the same Apple ID, they would have access to their purchases. Under the hood, RevenueCat will use "anonymous" user IDs. Unlike an explicitly defined user ID, anonymous user IDs are not meant to be stable.

I hope this is useful.

 

Best regards,