The Senate has passed a bill to tax backpackers' incomes at 15 per cent, in an extended late-night sitting on Thursday.

Senators voted 43 to 19 in favour of the bill, after the Turnbull government struck an an 11th-hour deal with the Greens.

Rod Culleton, Derryn Hinch and Jacqui Lambie were among the Senators who voted with the government, ending a week of farcical politicking as Parliament rises for the year.

The deal will bring peace of mind to farmers and regional communities, who faced the possibility that working holidaymakers would automatically be whacked for 32 cents in the dollar from January 1 if no compromise was reached.