Liverpool will get a fixed £27.4million with an additional £5.1m based on appearances and 3m euros based on individual and team achievements.
The Reds turned down two bids from Bayern before the two clubs settled on a move for the 30-year-old, whose deal with the Reds ran until next summer.
He joined Liverpool for £31m plus £2.5m in add-ons from Southampton in 2016.
Since then, Mane scored 90 English Premier League goals for the Anfield club and finished last season with 23 goals in all competitions.
Sadio Mané is set to join Bayern on a permanent deal from Liverpool, here we go! Agreement set to be reached after direct meeting between the two clubs today. 🚨🇸🇳 #FCBayern
Personal terms already 100% agreed on a three year deal.
— Fabrizio Romano (@FabrizioRomano) June 17, 2022
News of his departure follows last Tuesday’s signing of Uruguay forward Darwin Nunez from Benfica for an initial £64m.
Alongside fellow forwards Mohamed Salah and Roberto Firmino, who are both 30, Mane has been integral to Liverpool’s success in recent years.
The trio helped the club win the Champions League in 2019 and then end a 30-year wait for the league title in the following season.
This has also been an exceptional year for Mane, who won the Africa Cup of Nations with Senegal before helping Liverpool win the Carabao Cup and FA Cup and finish runners-up in the Premier League and Champions League.
Mane is expected to replace Robert Lewandowski at Bayern, with the Poland international set to lave the German club having been linked with a move to Spanish giants Barcelona.