The nonlinear dynamics of exciton-polaritons in semiconductor microcavities is treated within a model of interacting bosons for the signal, pump, and idler modes. The correlations between all three polariton modes are taken into account in the lowest order in the framework of a self-consistent mean-field approach. The main result of this approach consists of the description of the onset of a spontaneous coherent emission in a nonlinearly interacting two-dimensional polariton system. It is shown that the correlations between all three polariton modes including the pump mode are essential in order to describe the transition to coherence. The transition is followed in detail and in particular the behavior of the correlations of the fluctuations in the different modes is analyzed.