In peer-to-peer (P2P) systems, peers often must interact with unknown or unfamiliar peers without the benefit of trusted third parties or authorities to mediate the interactions. Trust management through reputation mechanism to facilitate such interactions is recognized as an important element of P2P systems. It is, however, faced by the problems of how to stimulate reputation information sharing and honest recommendation elicitation. This paper presents an incentive compatible reputation mechanism for P2P systems. It has two unique features: (1) a recommender's trustworthiness and level of confidence about the recommendation is considered for a more accurate calculation of reputations and fair evaluation of recommendations. (2) Incentive for participation and honest recommendation is implemented through a fair differential service mechanism. It relies on peer's level of participation and on the recommendation credibility. Theoretic analysis and simulation show that the reputation mechanism we propose can help peers effectively detect dishonest recommendations in a variety of scenarios where more complex malicious strategies are introduced. Moreover, it can also stimulate peers to send sufficiently honest recommendations. The latter is realized by ensuring that active and honest recommenders, compared to inactive or dishonest ones, can elicit the most honest (helpful) recommendations and thus suffer the least number of wrong trust decisions.