If you want to avoid accidental in-app purchases, you might want to adjust your settings in the Google Play Store.
Please follow these steps:
- Access the Google Play Store
- Go to "Settings"
- Go to "User Controls", then activate the setting "Use password to restrict purchases"
- Enter your new password and choose confirm.
- Any in-game purchases after having activated these settings will first require you to enter your security password.
However, please note that, once you entered your password, you can purchase items on Google Play for 30 minutes without having to enter it again.
In addition, if your device is running Android OS 4.2 or higher and someone else is using it on a regular basis, you might be able to create a different profile for them. Go to: Settings --> Users --> Add user, then follow the on-screen instructions.