If you have ever backpacked in Australia and have paid the so-called backpackers' tax, you might be owed some money after the federal court found it to be, in some cases, invalid.

The tax, which came into effect in 2016, means that foreigners on two specific working holiday visas are taxed 15% on earnings less than $18,200 AUD (€11,250), despite Australians not paying anything until they exceed this threshold.

But the federal court has now said that foreigners paying the tax while living as residents in Australia should not be allowed.

This means that if you reside in one place during your working holiday, you could be considered a resident, while others who move from place to place may not.

In the ruling on Wednesday, Justice John Logan said the tax was a "disguised form of discrimination based on nationality" and found that it violated a double taxation treaty that Australia holds with other countries.

Such countries include Germany, Finland, Norway, Turkey and the UK, and could count for tens of thousands of backpackers who could be owed hundreds of millions of Australian dollars, according to local media.

The court's decision this week comes after a tax company brought the case on behalf of British backpacker Catherine Addy, who lived in Australia between 2015 and 2017.

She was considered a resident as she spent her time living in a houseshare in the Earlwood suburb of Sydney.

Speaking to ABC News about the court ruling, she said: "I think it is wrong that foreigners should be taxed more harshly than Australians when they are doing the same work."

"In my opinion, it is a slippery slope. It just makes sense, no matter where you come from, that if you are doing the same work then you have to be paid the same money."

The Australian Tax Office has said that it is considering whether to appeal the court's decision.