Online retailer has filed a lawsuit in a federal court to block the North Carolina state government's demand it disclose all transaction details, including names and addresses, involving state residents, court documents show.

In the complaint, Amazon said that North Carolina Department of Revenue (DOR) is demanding that the retailer turn over the name and address of virtually every North Carolina resident who has purchased anything from Amazon since 2003.

Amazon also said in the court filing that DOR also demanded the company furnish records of what each customer purchased and how much they paid.

The company said the disclosure of such information will invade privacy of its customers.

The lawsuit comes at a time when some states, searching for ways to increase revenues in a weak economy, are mulling the option of taxing out-of-state Internet retailers, following in the footsteps of New York, which passed such legislation in 2008.

North Carolina's DOR is auditing Amazon's compliance with state sales and use tax laws. The company said in the filing that it is fully cooperating with the audit.

Amazon said that it has already provided voluminous information to DOR to conduct its tax analysis without violating its customers' privacy.

But the DOR has no business seeking to uncover the identity of Amazon's customers who purchased expressive content, which makes up the majority of the nearly 50 million products sold to North Carolina residents during the audit period, the company said in the court filing.

The case is In re: LLC vs Kenneth R. Lay, Case No. 10-00664, U.S. District Court, Western District of Washington.

(Reporting by Sakthi Prasad in Bangalore; Editing by Lincoln Feast)