Mega Farm is a free to play game, however you can shop inside the game for real money.
If you don't want to accidentally make a purchase, set a limit on purchases on your device.
More information on how to avoid accidental purchases can be found at the following link: