Retailer Debenhams has successfully appealed in the High Court against a tax tribunal ruling which found it was avoiding paying VAT.
This is a major victory for retailers
The chain has argued that 2.5% of the cost of goods bought by credit or debit card should escape VAT, because under EU law banking fees are tax exempt.
Last year, the independent VAT tribunal ruled that "handling fees" such as that amounted to VAT avoidance.
The outcome could cost the Treasury millions of pounds in lost revenue.
The treasury could lose out even more if the stores succeed in increasing the fee they charge for the use of cards.
Retailers including Marks & Spencer, Boots, WH Smith, Tesco and J Sainsbury run similar schemes.
Prices including the 2.5% card-handling fee are the same as they would be for a cash sale.
The Treasury has said it would try to overturn the decision and would lobby other EU countries to change the VAT law to ensure retailers were "not able to avoid tax".
"People will find this decision difficult to understand," said John Healey, economic secretary to the Treasury.
The Treasury estimated that about £300m was at stake from existing cases.
A switch by every High Street retailer to the scheme accompanied by a boost in charges to 5-10% could cost billions, the Treasury said.
Goods in Britain are generally subject to VAT at 17.5%.