I was having the same problem, and all the other answers didn't solve the problem. However I figure a solution to solve the problem. Please note this works specifically for games, but I have a theory near the end that it will then allow you install apps with the right account.
The problem lies with what account the downloaded and installed application is associated with. To check which account it is, go to the play store, switch to the account you expect it to be in and then go to the "My Apps & Games". Then pick the secondary tab "All". If the game doesn't appear in this list, then this is the reason you are having a problem. Keep switching accounts and you will eventually find which account it is associated with.
Now let's fix which account it is associated with:
- First you need to uninstall the game.
- Then you need to remove the game from the account that it is associated with.
- You do this by doing the same steps as above for checking, then afterwards you need to press the cross ("x") button in the top-right corner to remove it.
- Open (or download, install then open) the Google Play Games app.
- Make sure you are logged into the correct account (on both
Google Play Games
and Google Play Store
) you want the game to be associated with by using the hamburger menu on the top-left.
- Find the game you want to play, and then click on the
store
button (normally the button would read open
if it was already installed).
- Install as normal.
- Open the game and you'll see you can now make in-app purchases to the right account. :D
The steps above seem to force the play store to make sure it associates the game with the right account. I have a theory that after you have done the steps above, you can then search for a regular application and install it and it should be associated with the same account... and will then allow you to do in-app purchases too. I haven't tested this however, since I only needed it to work for games - so feel free to leave comments if my theory is correct.