Matthias Sammer, the club's sporting director, confirmed yesterday that a deal had been reached between both the clubs and the player.
It had been speculated that Mandzukic would struggle for game time following the arrival this summer of Robert Lewandowski at the German champions. His move to Spain - thought to be worth £18.5m -is expected to be confirmed before the weekend.
He would replace striker Diego Costa, who moved to Chelsea. The London club have since signed Mario Pasalic from Hajduk Split.