Apple charges up to 30% on all digital transactions within apps on its platforms.
The case was a limited victory for Epic Games, which makes the popular video game Fortnite, as the judge rejected allegations that the company has been running an illegal monopoly that throttles competition and innovation.
Fortnite's maker had filed what it hoped would be a landmark antitrust case last year, with the objective to brand Apple as a "monopolist".
The decision from US District Judge Yvonne Gonzalez Rogers also provided Apple with some vindication by not requiring Apple to allow competing stores to offer apps for iPhones, iPads, and iPods.
But the judge did agree that Apple had been engaging in unfair competition under California law, and ordered the company to allow US software developers to insert links to other payment options besides its own within iPhone apps.
The change could potentially affect billions of dollars in revenue annually for Apple, a prospect that rattled investors and caused the company's stock to fall by nearly 3% on Friday.
Apple's general counsel Kate Adams said the company was "very pleased with the court's ruling and we consider this a huge win for Apple."
"This decision validates that Apple's success is not illegal, as the judge said," she added.
However, Apple said it may appeal the portion of the ruling that will make it easier for developers to sidestep its commissions.
The US judge also ruled that Epic Games breached its contract with Apple when Fortnite added a non-Apple payment system to its app. She urged Epic to pay Apple €3.1 million or 30% of the revenue it collected while violating the tech giant's commissions.