Solved

Reset subscription status when switching accounts

  • 12 December 2021
  • 1 reply
  • 162 views

Badge +3

I’m having trouble wrapping my head around what’s going on, but I’ll lay out expected results, and actual results below. Two Scenarios, two different issues. 
 

Scenario 1:

  1. Application is installed
  2. Anonymous user makes a purchase
  3. User logs into account
  4. RevenueCat.Login()

Expected Results:

The newly created user now has the membership entitlements. 
 

Actual Results:

The newly created user does not have any entitlements until I restore purchases or attempt to purchase the subscription again. 
 

Important Notes:

I tried out Revenue Cat about 5 months ago then came back to it now, so is it because maybe the user already existed from my old attempts causing the identities not to be merged? 
 

Scenario 2

  1. User A purchases Subscription
  2. Relaunch App
  3. User A RevCat Login
  4. User A RevCat Logout
  5. User B RevCat Login

Expected Results:

Only User A has membership entitlements

Actual Results:

Whichever user logs in has membership entitlements 

 

 

icon

Best answer by ryan 14 December 2021, 00:38

View original

1 reply

Userlevel 5
Badge +9

Hey @Michael Jajou!

Is your Restore Behavior set to Transfer? This server-side setting controls the behavior of these scenarios: https://docs.revenuecat.com/docs/restoring-purchases

 

Scenario 1:

I tried out Revenue Cat about 5 months ago then came back to it now, so is it because maybe the user already existed from my old attempts causing the identities not to be merged?  

This would definitely have an impact on things, since it would technically be the same subscription you purchased 5mo ago getting repurchased now. RevenueCat knows that you already logged in another user with that subscription, so it doesn’t get transferred when the new account is created (#3). You can create a new sandbox account in App Store Connect to start fresh here.

 

Scenario 2

  1. User A purchases Subscription
  2. Relaunch App
  3. User A RevCat Login
  4. User A RevCat Logout
  5. User B RevCat Login

There could be a few things going on here, but if 1-5 are happening within quick succession in sandbox the subscription renewal (happens every 5mins in sandbox) could be getting posted to the transaction queue which RevenueCat will pick up and post with the current App User ID. If that’s the case, I’d expect User B to have transferred the subscription from User A.  

Reply