President Carter ordered yesterday a halt to the export of all American goods and technology intended for use at this summer's Olympic Games in Moscow, and barred NBC from making further payments or shipments of equipment related to its contract for televising the Games.

Putting economic muscle behind his opposition to holding the Games in the Soviet capital in the wake of the Soviet Union's invasion of Afghanistan, the president ordered the secretary of commerce to deny licenses for American goods and services earmarked for the Moscow Olympics, and to revoke export licenses for items that have not yet been shipped. Medical items were exempted.

The president also prohibited transactions and payments associated with the Games, including NBC's shipment of additional broadcast equipment or payment of remaining installments of the $87 million in rights and facilities fees it had agreed to pay for the Games.

Carter asked U.S. businesses on March 12 to withhold Olympic-related exports voluntarily, but some companies requested a mandatory ban to reduce their legal liability to suits for breach of contract, Commerce Department sources said.

The president dispatched a memorandum to Commerce Secretary Philip M. Klutznick, directing him to "prohibit the export to the U.S.S.R. directly or indirectly any goods or technology . . . which are in connection with the Games, and to prohibit payments or transactions (which could) provide financial support for such Games."

In addition to the unpaid portion of NBC's rights and facilities fees -- estimated by industry sources at $20 million -- the ban covers about $20 million in Olympic-related equipment, ranging from athletic clothing and apparatus to computers and timing devices, according to Commerce Department spokesmen.

Homer Moyer, Commerce Department general counsel, said the issue of indemnifying U.S. companies for losses incurred because of compliance with the export restrictions had not yet been addressed.

Moyer acknowledged that there had been pressure from business to make the ban compulsory in order to help protect suppliers from lawsuits by the Soviets, but said the action was taken "for reasons obviously much broader."

The White House issued a statement calling the Soviet occupation of Afghanistan "an unusual and extraordinary threat to the national security, foreign policy and economy of the United States," Press secretary Jody Powell said the embargo was intended "to make clear the United States government's firm opposition to participation in the Moscow Summer Games."

The president already has informed the United States Olympic Committee (USOC) of his decision that Americans should not participate at Moscow. White House counsel Lloyd Cutler said yesterday the administration has "every reason to expect" that the USOC will abide by the president's decision.

"However, should the USOC's policy-making House of Delegates vote at its April 11-13 meeting to send a team to Moscow despite the president's request -- as one influential USOC member suggested this week -- Cutler said "the government is not without its resources" to prevent the participation of American athletes.

Cutler declined to specify what powers the president has in this regard, a question the Justice and State departments also have been reluctant to discuss in detail.

A State Department official said yesterday, "We have made certain determinations, and the attorney general is working of something." He said the administration "is not considering taking away passports or restricting individual travel in any way," but that the president could invoke emergency powers prohibiting all Americans from traveling to the Soviet Union during "a period of stress."

One of the reasons the president acted formally to ban Olympic-related exports and transactions at this time is that NBC has a major payment due the Soviets shortly, Commerce Department sources said. It was learned that the network already has paid $67 million, and has a $9 million payment due April 1. The balance is due in payments this summer, one before and one after the Games.

NBC spokesmen issued a statement last night that the network "would be guided by the policies and regulations of the U.S. government" and "will take appropriate action to comply with the president's order."

NBC's contract with the International Olympic Committee (IOC) and the Soviet organizers calls for it to pay $35 million in rights fees -- one-third to the IOC, and two-thirds to the Soviets -- plus $52 million to the Sovets for broadcast facilities.

In addition to the $87 million, NBC already has shipped 45 tons of broadcast equipment, valued at more than $4 million, to Moscow. No decision has yet been made on whether NBC will try to ship this equipment back to the U.S. before the Games.

NBC is insured for 90 percent of its $87 million outlay by Lloyd's of London, but is not covered by any other out-of-pocket expenses or lost revenues. NBC has said it will not televise the games if an American team does not participate, and can collect from Lloyd's in that event, even if the Games are held without U.S. athletes.