You can avoid accidental purchases by changing your device settings.

1. Go to Settings > General > Restrictions.
2. Choose Enable Restrictions.
3. Enter a password for the Restriction option and confirm it.
4. Once you enable restrictions, you will see a list of the apps and actions that are permitted on your device. To restrict in-app purchases, turn off the appropriate option.