I put this miro board together to try and figure out a flow that might work
Hi @DankLSS
Thanks for the detailed message. I think that the problem you are describing makes sense, let me try to dig deeper on your scenario to see what an optimal solution would look like.
> But if I install the app, get an AnonID , buy tokens and then login as an existing user the tokens I had bought aren’t transfered over to the new login and added to any that are there. I can see times you’d want this and times you wouldn’t .
Do you know in what scenarios you would like to transfer and which ones not? There is one main problem with transferring our Virtual Currencies. What happens with currencies spent and what unlocked on your app? In what scenarios would you like to transfer (based on what) and how would you handle that scenario?
The solution we went for now is never transfer (happy to discuss when we should do it), but we have APIs that would allow you to deduct currencies from a given user and assign currencies to another one, so you can manually implement that transfer
> Also right now if I a user logs out of my app I also log out of rev cat and then get a new anonID which complicates it further. I wonder if even though someone logs out of my app I don’t want to also log out of revcat but keep it associated with the same account. .. it’s tricky. Maybe if they log into another account then I switch the id.. Will have to do some testing.. but even explaining this and all the edge cases (which I’m sure there are more) is tricky.
Do you expect more than one account on a device? If not, I would probably not offer a logout functionality. If they login with another identified account, then you can change the account when the new login happens.
If you can share what you’d like to happen in all scenarios, we can discuss it and see what’s missing on our side. BTW, if you prefer to discuss this via a zoom call or in discord, let me know, so we can have faster discussions
Thanks for the reply. I think 99% of the time it’s one user per device so I think that no logging out of rev cat feels like the right plan even if they log out of their acocunt. If they then log into another account in my app I’ll also call the login for rev cat to update the userid.
The only time I think I’d need to transfer tokens is if an anon user (fresh install for example) buys tokens as anon and then logs into an existing account in my app which is also linked to an existing rev cat account.
The api is in beta and the ios sdk seems to only be available on a dev / beta branch. I’m guessing I should hold off on doing this till the api is official? Are any users live with this feature?
I’d want to add/delete currency which I’ve successfully done via a web post from my backend server. The ios sdk has a way to check your ballance but I’m not on that branch. I noticed if I add 0 currency via the web endpoint “…/virtual_currencies/transactions” I get a json back with the balance that way but I’m guessing there’s a seperate call for just getting your balance as this sort of feels like the wrong way to use that endpoint.
Thanks for the reply!
Hi @DankLSS ,
> The only time I think I’d need to transfer tokens is if an anon user (fresh install for example) buys tokens as anon and then logs into an existing account in my app which is also linked to an existing rev cat account.
Would you prefer in this case to transfer the purchase, or would you consider those accounts the same and prefer aliasing them?
> The api is in beta and the ios sdk seems to only be available on a dev / beta branch. I’m guessing I should hold off on doing this till the api is official? Are any users live with this feature?
We have a few apps already using it live. The idea is that people use it and provide feedback to it so we can improve it. If you have any feedback about the SDK or API, let us know
> I’d want to add/delete currency which I’ve successfully done via a web post from my backend server. The ios sdk has a way to check your ballance but I’m not on that branch. I noticed if I add 0 currency via the web endpoint “…/virtual_currencies/transactions” I get a json back with the balance that way but I’m guessing there’s a seperate call for just getting your balance as this sort of feels like the wrong way to use that endpoint.
The SDK is still in a beta branch and you can install it. All docs are here: https://www.revenuecat.com/docs/offerings/virtual-currency
There’s a specific endpoint for balances → https://www.revenuecat.com/docs/offerings/virtual-currency#reading-balances
Feel free to DM me if you need any help. Happy to chat about your app / implementation