19

Typical scenario, user has two accounts, xyz@gmail.com and abc@gmail.com, both on their Android device. The user buys my premium upgrade on version 1.0 using account xyz@gmail.com, then they update to version 1.1 and the code (the in-app purchases code) now thinks they are using account abc@gmail.com, so it thinks the user hasn't bought the premium upgrade. I know it is using the wrong account because they send me their order email and then they tell me the wrong email is listed on the buy dialog if they press on the $ amount. The only fix at this point is to uninstall and reinstall using the Play store desktop website and the right account.

I am using the IABHelper from the sample with some fixes from StackOverflow. As far as I know there is no way for me to even choose the account they are using for that.

Any ideas on what might be going on? has this happened to anyone else?

The code exceeded the length limit at StackOverflow so I've put it here http://pastebin.com/hLquZ6SP

EDIT: I now have a user who claims this happens to him every time he updates the app.

EDIT: This happens a lot more during staged rollouts, I think because the account that gets the staged update is not the one the user bought the IAP with.

casolorz
  • 8,486
  • 19
  • 93
  • 200
  • 1
    the code sample should be part of your question, and **not** be added answers – Kai Apr 27 '15 at 02:19
  • "The user buys my premium upgrade on version 1.0 using account xyz@gmail.com, then they update to version 1.1 and the code now thinks they are using account abc@gmail.com" --> Could you elaborate the logic implication here? – Sebastiano Apr 30 '15 at 20:06
  • The user installs the app. The user has two gmail accounts (xyz@g... and abc@g...) in their android device. They buy my premium in-app purchase features and the app version is 1.0. The premium features are bought typically under whichever account they used to install the app, let's say xyz. I'm not even sure whether I can control that. Then I release an update, 1.1, and when the user opens the app again, the app now thinks they are using account abc and they haven't bought the premium features. The only way to fix it is to uninstall and reinstall using the website version of the play store. – casolorz Apr 30 '15 at 20:14
  • I should add that this is happening to a small fraction of my users, a tiny fraction I would say but then I'm guessing the amount of people with two gmail accounts on their device is also tiny. Of my over 15k sales I only get 5 or 6 complaints about this on every release. – casolorz Apr 30 '15 at 20:17
  • Are you sure you're not mistaken and the users have been using IAP with account abc all along. Honestly I've seen the IAP only going through the first account added on to the device. To purchase in app items I had to remove all the other accounts. – charliebeckwith May 01 '15 at 02:19
  • Except for the one I wanted to make the purchase with (when testing my own app) – charliebeckwith May 01 '15 at 02:19
  • Some users won't help me troubleshoot the issue but some do. In those cases they have forwarded me the purchase email and they have told me what email shows up when they try to buy again (you can press on the dollar amount to have the email shown) and it is always different emails. – casolorz May 01 '15 at 16:16
  • @mtngoat this is the first explanation that makes sense for some support problems with my apps. Some users, typically after upgrading their phones, have trouble restoring their purchases. They claim they have the same email address, and sometimes I can find their orders, but sometimes not. I will start asking them if they have multiple accounts on their devices... – mm2001 May 26 '16 at 22:38
  • @mm2001 usually I ask them to forward me the email with their order number and to send me a screenshot of the purchase dialog with their email showing (they have to press on the $ amount to reveal it). When they do that it becomes clear to them what the issue is. This issue is particularly bad when releasing staged updated because their secondary account might get the update before their primary account does. – casolorz May 27 '16 at 12:49
  • @mntgoat Thanks for that. I'm amazed how many of my customers can't find their order email (it's a very nontechnical app). I'll keep trying with them. Then there's yesterday, after 10 emails back and forth the subscription just suddenly activates for the customer. Go figure. (2 accounts, primary was purchase, 2nd didn't even have CC). – mm2001 May 27 '16 at 14:07
  • @mm2001 I've actually started giving the users a free promo code for their second account so the issue won't happen again. – casolorz May 27 '16 at 14:44

3 Answers3

2

This appears to be a bug in the Play Store app. See this Google Help Forum post for a user workaround.

Basically, the Play Store app sometimes associates the wrong Google Account with an app's in-app billing. But it seems to work correctly when the app installation is "pushed" from the Play Store website (from a computer).

One caveat though: In the above linked thread, there's a report of the workaround correcting the account and billing association, but then reverting back to the incorrect Google Account after an app update. So, I'm unsure if this workaround is reliable.

hungryghost
  • 9,463
  • 3
  • 23
  • 36
  • The workaround works well and I've been having my users use it, I've also just been giving them free promo codes so their other accounts can have my in-app purchase. The problem is that neither solution fixes the problem permanently and only helps those users who contact me, doesn't solve the bad reviews problem. – casolorz Apr 05 '16 at 12:49
0

I had same issue with a very small number of users too.

It is impossible to control in the code, which account is used for purchase validation. When this happens I ask users to select the account they bought an in-app extension with in Google Play app, then restart the device, launch application and execute "restore purchase" operation. In most cases this helps. If it doesn't then they need to use Google Play web ui, pretty much how you described it.

I have also to admit, that the most of such issues I experienced back in 2013, beginning 2014, and never since then. Maybe Google improved this in some way.

sergej shafarenka
  • 20,071
  • 7
  • 67
  • 86
  • Interesting, I didn't actually use to have this issue, I've only started having it on the past two or three updates I've done but I don't know if that was just a lack of a large enough user base or if something has changed. – casolorz May 02 '15 at 11:31
  • I just had a user reported this issue to me. So this problem is still there. – Kimi Chiu Jan 12 '18 at 09:35
  • @KimiChiu I reported this issue long ago but they have closed it as "won't fix" https://issuetracker.google.com/issues/36967788 – sergej shafarenka Jan 12 '18 at 18:42
  • @sergejshafarenka I found another similar question. https://stackoverflow.com/q/44397765/3109401 Looks like there's an Android team member said that it is underdevelopment. – Kimi Chiu Jan 13 '18 at 03:08
0

You have no way to specify in your code which user account will be used for the purchase, because the OS/Google Play decides that:

  • if you download the app from the Play Store using account xyz, then the same account will be the one billed for the purchases related to your app
  • if you install the app again (re-install or other device) using an other account abc then this will be treated as the owner of that app, therefore the purchases from xyz are not visible into abc account
  • if you sideload the apk then the account owning the app will be the first Google account created on the device

To me what you are describing looks more an issue with some customer being played by the way the Google IAP model works. The subtle issue is sometimes users have different active account across devices, so it can be hard to notice you are actually downloading the app using another account.

a.bertucci
  • 12,142
  • 2
  • 31
  • 32
  • I completely agree with the 3 scenarios you described however my users claim that they haven't reinstalled or installed on a new device (though that is a common different issue) but that it was just the new update that caused it. – casolorz May 02 '15 at 11:29