A permanent fee of 20 million pounds will be automatically triggered if the striker makes a certain number of Premier League appearances this season, plus a further three million pounds in contingent payments, the east London club said.
"I want to thank everyone for welcoming me... I wanted to start a new experience and I feel this is the right choice for me," Zaza told the club's website (www.whufc.com).
"I have been fortunate enough to have already played at the new stadium with a different shirt. It is a beautiful stadium and I felt the warmth of the fans and this was a big reason why I wanted to join the club."
West Ham, who failed to make the Europa League group stage for the second year in a row after being eliminated by Astra Giurgiu, face Manchester City away in the league later on Sunday.
(Reporting by Ian Rodricks in Bengaluru; editing by Amlan Chakraborty)