The case, in the State of New York Court of Appeals, represents one of the first legal tests of recent "Amazon taxes" meant to make online retailers start charging state sales taxes.
Amazon and Overstock attorneys argued before the court that a 2008 New York law requiring companies with affiliates in the state to collect sales tax was unconstitutional.
For New York, millions of dollars in tax collections ride on the court's decision, expected by June.
Retailers with a physical presence in any state must remit sales tax on purchases made either in a store or online.
But a 1992 Supreme Court decision, Quill Corp v. North Dakota, said retailers lacking a "nexus" of operation in a state need not collect sales tax.
The New York law applies the nexus concept in a novel way. It says that websites with purchase buttons for Amazon or other national retailers get fees based on sales delivered that make the sites local solicitors for the larger retailers.
Lower courts have sided with the state and found in favor of the law. But on Wednesday, some members of the five-justice panel took clear interest in the companies' argument that web referrals do not constitute a local sales force, but rather are something more akin to buying newspaper advertising.
The idea that putting an ad in the newspaper makes the paper an advertiser's sales force is "absurd" argued Randy Mastro, a partner with law firm Gibson Dunn, representing Amazon.
Steven Wu, attorney for the state, said web purchase buttons differ from advertising. "Advertising gets people to the door of a business, soliciting gets them to the register," said Wu.
Between the law's passage in 2008 and February 2012, online-only retailers collected and remitted to New York $360 million in sales tax on more than $4 billion in transactions, according to the state's Department of Taxation.
Legislation that could resolve these issues has been introduced in the U.S. Congress, but has not come to a vote. The issue may end up before the U.S. Supreme Court. Mastro said the case will be appealed no matter the result.
The cases are Overstock.com v. New York State Department of Taxation and Finance, New York State Court of Appeals No. APL-2012-00017, and Amazon.com v. New York State Department of Taxation and Finance, New York State Court of Appeals No.APL-2012-00045.
Reporting by Nanette Byrnes; Editing by Kevin Drawbaugh and Bob Burgdorfer