Brahim, 18, is poised to move to Santiago Bernabeu in a deal worth an initial £15.5 million ($19m), plus £6.5m in add-ons.
City have also agreed a clause with Madrid that entitles them to 15 per cent of any future transfer fee, should the forward sign for another club in the future.
But not every club.
City have also included an agreement whereby they would receive 40% of any future transfer fee... if Brahim were to join Manchester United.
Brahim joined City from Malaga as a 14-year-old and was regarded as one of the club’s academy graduates with the best prospects of making an impact in the first-team.
There is no buy-back clause included in his transfer, but the Blues have ensured they will benefit in some way if the winger goes on to seal a big-money transfer elsewhere.
The Spanish forward would have been out of contract at the Etihad Stadium in the summer, and refused to commit to a new deal with the Premier League club because he did not believe he would get enough first-team opportunities in the coming years.
City made a number of big offers in a bid to retain Brahim’s services, but were unable to convince him that he will play more in first-team football than he will in Madrid.
Despite the Blues’ failure to persuade one of their highest-rated youngsters to stay, they are understood to be happy with the terms of the transfer, and believe many of the additional add-ons, which would take the overall value of the deal above £20m, are achievable.
City will receive more money once Brahim plays a certain amount of games for Madrid, plus an extra instalment if he signs a new contract in the Spanish capital.
Brahim’s contribution will be assessed in the summer and a decision will then be made over whether he is sent out on loan or kept in the squad for next season.
Goal revealed on Friday that Brahim’s advisors weighed up the possible impact of Jose Mourinho taking over at the Bernabeu before signing off on the deal.
Sources close to the player do not believe that Mourinho is likely to replace Santi Solari at the end of the season, however, and a final agreement with the Champions League holders was reached at the end of 2018.