Depends what the bonuses are. If it's 25 league goals, a CL win and a PD win in total then they might pay it inside 2 seasons. Soriano is probably a €5m player at most right now, but might be useful. It seems to suit both parties.
I think that bonuses are usually never paid fully. It sure depends what did Barca and Udinese agree on, but the bonuses usually consist of 5-10 different things.
For example (I repeat: this is just an example

) it could be like this:
2 million if he plays at least 50% of the matches while he's in Barca
2 million if Barca win the CL this year, 3 million if they win 2 CL's with Sanchez in the team
1 million if he scores +50 goals for Barca, additional 2 million if he scores +100
1 million if Barca win La Liga this year, 3 million if they win 3 La Liga titles while Sanchez plays for them
In total it will be 11 (paid throughout 4,5 or 10 years, depends how long Sanchez is there), but it could be 0, 1, 2, 3 or more.