Texaco Inc., one of the nation's biggest oil companies, stopped accepting credit card purchases at its 400 Maryland service stations last night after losing the latest round in a legal fight over the right to impose a credit card fee on its dealers.

A new state law banning the fee went into effect at 12:01 a.m. today.

Although other oil companies have also fought for the right to charge the credit card fee in Maryland, Texaco is the first to actually halt credit card transactions in the state. Texaco credit card sales will proceed as usual in other states where the card fees are permitted, officials said.

In a prepared statement issued by Ed Williams, a company representative, Texaco said:

"The legislation the Maryland law prohibits the petroleum industry and only the petroleum industry from assessing a processing fee on oil company credit cards. Texaco firmly believes the legislation is discriminatory and punitive and will continue its efforts to see that the law is overturned."

Maryland Deputy Attorney General Paul F. Strain, who helped direct the state's defense of the law, wasn't surprised by the Texaco decision to halt credit card sales. "They have been saying from the beginning that they would do it," he said yesterday.

However, Strain said that there "were and are reasons to be skeptical" that Texaco has dropped credit card sales in the state permanently. The company might well choose to reactivate its credit card sales "if the law remains on the books and the state continues to win in the courts," said Strain, who noted that other companies have found ways to "comply and live and prosper under the law and maybe Texaco will as well."

Texaco officials said yesterday that dealers do have the option of continuing to honor Visa and MasterCard.

Exxon, in the meantime, has fashioned another response to the Maryland law. Starting Aug. 24, the company will require that all Maryland credit card holders pay their Exxon balance in full each month rather than take several months to pay the bill as they now are allowed to do when the balance is $40 or more. That change will convert the Maryland card from an open-ended revolving plan to a closed-end credit plan. And according to Exxon, the Maryland law allows a company to impose a credit fee on its dealers when their customers are limited to closed-end credit.

The Exxon plan is to start charging a 3 percent credit card dealer fee in Maryland on Aug. 30. That will be coupled, a company spokesman said, with reduced wholesale prices for dealers aimed at offsetting the credit fee.

But Victor Rasheed, a dealer representative who opposes the credit fees, disagreed with Exxon's interpretation of the law. "They will face legal challenges if they switch to closed-end credit and impose a fee on dealers," said Rasheed.

Strain said his office now is reviewing the Exxon plan to determine if it complies with the state law.

A third company, Amoco, hasn't decided what action to take in Maryland, according to Roger Friskey, a company representative. "Right now, we are not planning to do anything. Our attorneys are studying the decision (to allow the law to take effect) and no action is planned until that is fully reviewed," he said.

The decision he referred to was made by U. S. District Judge Herbert F. Murray, who refused Friday to continue the injunction Amoco and Texaco had won to keep the credit card fee statute from taking effect as scheduled on July 1. Texaco had sought the injunction claiming that the law was vague, conflicted with existing federal legislation and would cause the company irreparable injury if it were enforced.

Texaco estimates that the cost of extending that credit today to its customers averages more than $100 million a year. Last November, it began imposing a 3 percent fee on dealer credit card sales. Under that plan, a dealer who submits $100 in credit card charge slips to Texaco will get back $97. It is then up to the dealer to make up that loss by pricing his gasoline at one level for cash customers and at a higher level for credit customers. A dealer can choose, however, to simply charge a single price for all customers.

The oil company plans typically incorporated reduced wholesale prices for dealers that compensate somewhat for the credit card fee. At the same time, the company carrot-and-stick plan urges dealers to offer their customers "discounts for cash." The amount of the discount depends on the dealer, but an Exxon spokesman said that the predominant cash discount for motorists in four pilot markets tested was 4 cents per gallon.

The Texaco move in late 1981 was widely seen as a trend of the future and an action that probably would be copied by other oil companies. Concerned that the plan would have an adverse effect on consumers, the Maryland General Assembly passed the law banning such fees during its last session.