This thesis is concerned with enabling e-commerce applications in decentralized environments, P2P networks in particular. The work goes along the following two dimensions: P2P reputation systems design and building P2P e-commerce services and applications. Enabling any kind of commerce has as the very first precondition providing appropriate assurance mechanisms that reduce or eliminate opportunistic behavior of the involved parties. Traditional forms of such mechanisms, such as contractual agreements monitored by enforcement institutions, are not always viable in an online world, particularly in global decentralized communities such as P2P networks. Under such circumstances, reputation systems as informal social mechanisms for encouraging trustworthy behavior appear to be the only remaining alternative. Their key presumption is that the participants of an online community are engaged in repeated interactions and that collecting, processing, and disseminating information about their past doings is informative of their future behavior and as such will influence it. In the first part of the thesis we deal with the problem of P2P reputation systems design. We start with giving a formal problem definition and statement. Then we analyze approaches appeared so far in the literature, provide a classification of the possible solutions and, upon analyzing the main properties of the identified classes, we come up with the conclusion that the class of so called probabilistic estimation techniques is particularly promising in P2P settings. We then proceed to define two probabilistic reputation systems. One is based on the binary (honest-dishonest) feedback and is concerned simply with separating cheating and honest peers according to an appropriate criterion. The other one, based on the well-known maximum likelihood estimation, is more general in the sense that it can cover any form of feedback, not only the binary one and that it can output probability distributions over the set of possible behaviors of the peers. The main properties of the method are low implementation overhead, clean decision making in the context of trust and good detection of peer misbehavior. We show this by carrying out a comprehensive comparison of the method to the other identified classes. Once the issue of trust is properly addressed one can consider equipping P2P networks with e-commerce services such as appropriate trading mechanisms suitable for P2P implementation and providing infrastructure for handling payments and exchanges of the traded goods etc. This is the subject of the second part of the thesis. We analyze an approach to safe exchanges of bundles of digital goods for money in which the exchange partners are better off at the end of the exchange than at any point before and provide an algorithm to find an appropriate schedule of deliveries of the goods and money that takes into account the trustworthiness of the exchange partners. Finally, we propose a double auctioning mechanism amenable to implementation in P2P networks. The mechanism exhibits good economic properties such as fast discovery of the equilibrium price and efficient trading. These properties are, however, dependent on the existence of a suitable underlying P2P reputation system.