I think using if/whether correctly is a little bit confuse for latin people (/me included), because we use just a single word for both case (“se” word).
Then the rule of thumb is: use “if” when you want to introduce a condiction and “whether” when something could happen or could not.
1) If you sing, I will pay you. //Here you are introducing a condition (I will pay you only if you sing).
2) I will pay you whether you sing or not. (I don’t care if you sing or not, I will pay you anyway).