You can avoid accidental purchases by changing your device settings.

For iOS devices:

1. Go to Settings on your device -> 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.

 

If you don't want to restrict in-app purchases completely, you can adjust the password settings for them. Make sure your restrictions are disabled and go to device settings -> App Store, iTunes Store -> Password Settings.

 

For Android devices:
1. Open the Play Store app.
2. Tap the Menu icon and select Settings.
3. Tap Require authentication for purchases.
4. Select one of the authentication options.
- For all purchases through Google Play on this device. Authentication will be required for all Google Play purchases (including in-app purchases).
- Every 30 minutes. The system will request the password for Google Play purchases every 30 minutes. Just note that once you enter a password all purchases made over the following 30 minutes will not need a password.
5. Follow the instructions on the screen.