In football, July and August are known as the “silly season”—and looking at Neymar’s world-record €222m ($261m) move from Barcelona to Paris Saint-Germain (PSG), it is easy to see why. The two months form the summer transfer window, in which football teams are allowed to buy each others’ players. With few competitive club games to enjoy, fans turn their attention to gossip about exciting arrivals and unwanted departures. Neymar is both. PSG have been trying to prise the Brazilian star from Catalonia for months. The saga reached a ridiculous crescendo last week as his Barcelona teammates insisted on social media that he was staying, while newspapers told of his imminent departure, which was confirmed on August 3rd (see chart). Barcelona have complained that PSG’s Qatari owners financed the purchase, rather than using the club’s revenues, which would breach the rules: teams are only allowed to spend as much as they earn. But as television revenues and sponsorship contracts have fattened, so have transfer fees. Most elite sides are willing to spend upwards of €40m on a talented addition to their squad. How do they arrange such deals?

Before anybody gets to the negotiating table, the buying team will have spent years identifying the right asset. Clubs have long relied on scouts to spot gifted youngsters, but they also have access to enormous video libraries and performance data. Though the manager is usually involved in choosing the target, the haggling is often done by a “director of football” or senior executive. If the player is under contract at another club, the executive must make a formal approach to that team. There are rules that prevent the buyer from contacting the player or his agent beforehand, an underhand practice known as “tapping up”. Nonetheless, rumours of interest from either party are often leaked to the press.

The subsequent negotiations are mostly conducted via WhatsApp, a mobile-messaging service, says Jake Cohen, a sports lawyer: its group-chat function, instant updates and security make it particularly convenient. Several agreements have to be thrashed out before a transfer can be completed. The first deal concerns the fee that the vendors will receive. Some players, such as Neymar, have a release clause—a sum that his owners have to accept, in this case €222m. Once the selling club feels that the price is about right, the second stage begins: the buying team offers a contract to the player via his agent, which for Neymar means an annual package of €30m after tax. The third settlement is the commission that the purchasing club pays this agent, which is typically 5-10% of the transfer fee, according to Andrew McGregor of Brabners, a law firm. Neymar’s team of representatives, which includes his father, will pocket a more generous reward of €38m. After putting its new player through a rigorous medical examination and filing the paperwork with the right regulatory bodies, the buying club can announce the signing.

If that seems complicated, it is made trickier still by fiddly clauses. The selling club might demand future payments if the player wins a trophy, or makes another lucrative move. The buyer will offer him performance bonuses, and compensation for using his image if he is a celebrity. Above all, the leverage lies with the footballer himself. If his contract expires, he is allowed to leave for free—a disastrous loss for his old team and a windfall for his new one, which will reward him with a cut of the avoided transfer fee. As the price of a lethal striker or a robust defender spirals, expect to see more players holding their owners to ransom.