You're okay doing a coding project for a few hours? Good for you! I like to get paid by the hour.
Since you asked for alternatives, here are some suggestions I have:
- If you want to do a 4 hour coding round even before a phone interview, at least pay for your candidate's time and effort.
- Otherwise, restrict your coding round to 1 hour. I think this strikes the right balance between lack of pay and my time spent.