I am working on preparing an Android app to properly support the `Transfer to new App User ID` behavior. Up until now, the project on RevenueCat was blocking transfers.
The app offers access to content based on a subscription, and the users require an account to purchase any subscription.
While reading the documentation, I noticed this section that mentions the following auto-transfer behavior:
So I made the following changes - as instructed by the docs here - , to make sure the existing subscription tied to the Google Play account doesn’t transfer to an anonymous user id:
- Only call `configure` or `login` on the SDK when the user is logged in the app (has a user id)
- Never call `logout` on the SDK
However, the problem that I noticed is that when I log in to another in-app account, the auto transfer behavior that is mentioned on the doc snippet shown at the beginning is not happening. Is that section of the documentation outdated or am I missing something?
Here is an example scenario that I ran in sandbox mode:
- Create an in-app account (account1@example.com) and subscribe
- Log out
- Create another in-app account and log in (account2@example.com)
Expected result (based on the docs): The existing subscription should be automatically transferred to account2@example.com
Actual result: No TRANSFER webhook is present when I monitor the latest webhooks sent in RevenueCat dashboard, thus the subscription is not transferred automatically. Also, I tried force stopping and restarting the app, but the subscription did not transfer in this case either.
However, if I call `Purchases.sharedInstance.restorePurchasesWith` when account2@example.com is logged in, the subscription is transferred properly to the new account.
I don’t mind this, I actually think it’s better this way, but I still don’t understand why that behavior mentioned in the docs is not happening in my tests. What I want to get is a clarification, because I don’t want to release the app like this and then be caught off guard when in Prod, that behavior starts happening to users.
Thank you!
Best answer by Ryan Glanz
View original