Apple has been dealt a major blow in its ongoing trial against Fortnite-maker Epic Games.
A court in Oakland, California, has ruled that Apple cannot stop app developers directing users to third-party payment options.
Apple had argued that all apps should use Apple's own in-app payment options, reports Reuters.
In a high profile trial, Epic Games had challenged the up-to-30 per cent cut Apple takes from purchases - and argued that the App Store was monopolistic.
On Friday, Judge Yvonne Gonzalez-Rogers ruled that "the court cannot ultimately conclude that Apple is a monopolist".
However, she also issued a permanent injunction, stating that Apple could no longer prohibit developers linking to their own purchasing mechanisms.
For example, a movie-streaming service will now be able to tell customers to subscribe via its own website, without using Apple's in-app purchasing mechanism.
Epic has also taken legal action against Google over its Play Store.
Apple's closed payments system is hugely lucrative for the tech giant, although the company says it does not know exactly how much it makes.
The ruling effectively states that Apple cannot ban developers from communicating with customers. Often there are cheaper options for consumers away from the App Store, however, Apple did not allow companies to tell consumers this.
Epic had argued that this was unreasonable and that developers should be able to inform users that they could make purchases away from the App Store.
However, in a win for Apple, the judge also ruled Epic failed to demonstrate Apple was operating an illegal monopoly.
Judge Yvonne Gonzales-Rogers said: "Apple enjoys considerable market share of over 55 per cent and extraordinary high profit margins."
But added: "These factors alone do not show antitrust conduct. Success is not illegal."
A spokesperson for Apple said: "Today the Court has affirmed what we've known all along: the App Store is not in violation of antitrust law.
"Apple faces rigorous competition in every segment in which we do business, and we believe customers and developers choose us because our products and services are the best in the world."
Epic Games' chief Tim Sweeney said the ruling was "not a win for developers or consumers" and vowed to "fight on".
Music streaming site Spotify said: "We are pleased with [the decision that] Apple engaged in anti-competitive conduct and has permanently prohibited their anti-steering provisions."
The ruling also revealed that gaming apps account for 70 per cent of App Store revenue.
It's likely the decision will be appealed, perhaps by both sides.
Apple's share price has fallen by 3 per cent since the decision, wiping billions of dollars from its valuation.