We're sorry to hear that, to prevent this from happening in the future be sure to set password prompt to appear before any purchase is made.
To make this possible, do the following:
On Android
1. Open Google Play and tap on the Menu Button at the top left.
2. Press Settings at the bottom and then under User Controls select Require Authentication for Purchase.
3. Select For all Purchases through Google Play on this device.
On iOS:
1. Quit the game and go to your iOS settings menu.
2. Choose iTunes & App Store, then Password Settings. ⚠️ Beware that this option only available if you're not using Touch ID to confirm your purchases.
3. Tap Always Require line, after confirming this option with your password all further purchases will require the entry of the password to be confirmed.