Solved

How to perform subscription migration, when there is no record of App Store receipts.

  • 3 April 2022
  • 1 reply
  • 128 views

Badge +1

Hi, Alankrit here, 
We are planning to move to RevenueCat from our existing subscription architecture, in which, we save Apple App Store user subscriptions, in our backend, and they have the “originalTransactionId” as the unique key. We do not store any App Store receipts. While reading the migration documentation here https://docs.revenuecat.com/docs/migrating-existing-subscriptions , I figured that it is required to have a record of all App Store receipts, in order to migrate existing user subscriptions to RevenueCat. Some answers :

suggest we should do Client Side migration. But, another aspect of our current architecture is, we first ask users to subscribe and only then they log in / sign up, so it is possible that at the time of subscription we may not have any user info. 
Question: Will client side migration work in this case ? 
And if so, any guidance on how to implement it would be really appreciated.

icon

Best answer by tina 8 April 2022, 21:17

View original

1 reply

Userlevel 5
Badge +10

Hey @Alankrit 

Client side migration will still work here. Here’s a flow that I imagine:

  1. User has an active subscription on your existing architecture 
  2. Updates your app (with the RevenueCat SDK)
  3. Call syncPurchases before asking the user to subscribe. This will pull their receipts from the device and sync them to an RCAnonymousID
  4. They log in with a custom app user ID and this will alias the anonymous ID with the provided ID 

Note that in step 3, if the user is able to skip logging in / signing up flow, they’ll have an active subscription associated with the anonymous ID. If you only want users to have access to a subscription when they’re logged in, you can check their current app user ID with await Purchases.appUserID and if it contains "RCAnonymousID:", you’ll know this person is not logged in. 

 

[Edit: I forgot to mention here that you should definitely have a restore button somewhere in the app in case users lose access. Docs for reference: https://docs.revenuecat.com/docs/restoring-purchases]

Reply