Question

Manage Subscriptions before signup

  • 11 February 2022
  • 2 replies
  • 87 views

Badge +1

In my application i want to achieve the following flow

Actual flow:
User install the app → Purchase the subscription → Create account on our app → Get access to app

Issue:
User install the app → Purchase the subscription → Uninstall the app

Now when a user re install the app we are calling restore function of Revenue Cat to restore purchases just to verify if the device has any active purchases If any purchase found → navigate to sign up screen and if no purchase is found → navigate to purchase screen again

In our app launch we are calling Restore function which restore purchases to anonymous user which is creating a edge case, that every time the app is installed it restores the purchases and any user who sign up will be bind to that purchase with provided app user id, means its possible to create multiple accounts on same device/same purchase.

For-example: App launches, restore happens and if there is no logged in user, some another user will create an account on same active subscription because we are assuming that he is same that user who bought the subscription but did not sign up.

So how should I restrict the multiple accounts creation on same active subscription plan but at the same time also want to implement the above case when user purchase the subscription but did not create account?  
 


2 replies

Userlevel 3
Badge +8

@Salman Shakeel 

We don't recommend restoring purchases automatically on launch - it's better to display a paywall to the user that lets them either purchase or restore (if a user tries to purchase a product they already own, Apple will automatically restore purchases, so you don’t have to call restore automatically on launch).

Are you worried about multiple identified (non-anonymous) accounts sharing a subscription? Or are you worried about the number of anonymous accounts that get created when deleting and re-installing? 

Badge +1

Thanks for responding 

Alright if i will stop restoring automatically on launch it will cause a bad user experience that in the case when user purchases a subscription and for any reason uninstall the application and later on when the user install the app without auto restore the user will be shown the purchase screen again this will create a bad UX that he has purchased something already but again shown the purchase screen i mean if a purchase is there the app should take take the user directly to signup on reinstall of app after restoring purchases automatically.  if apple restore purchase on same purchase buy but android gives an error that already purchased is that going to restore purchases too on android ?




1 - Are you worried about multiple identified (non-anonymous) accounts sharing a subscription? 
Yes as we want a purchase to be linked with single account of our app when i am using the identify()
function after login means on every login the user id gets identified by his id but this is creating a issue that if any user tries to login in to our app it gets identified and on reinstall if any user who tries to login first will be identified with the users purchase which we dont want.

I got the idea of identify function a bit wrong that if we provide a id to it its going to return a purchase against that id and if exist but what it does it links that id to device purchase means shares the purchase with two different ids (this is not what we want)


2- are you worried about the number of anonymous accounts that get created when deleting and re-installing?

Yes we are worried about this too as its a big loop whole a big bug case that if a purchase is made on one device user create a account and get access to application later on some third unknown person logouts the existing user and sign up another account on same device and the loop goes on we really need to stop this behavior of multiple accounts being created on our server on same device single purchase


The user experience we want to achieve is that a single purchase is linked to single user only and if another unknown person tries to signup on same purchase stop that as there is no unique id or transaction id given by revenue cat to stop this on our backend 

please guide me through all of this that how can i acheive this running all my use cases thanks
 

Reply