The growing importance of electronic commerce and the increasing number of applications in this area has lead research into studying methods of how to perform safe and secure online business transactions over the Internet. A central problem in this context is that of fair exchange, i.e., how to exchange two electronic items in a fair manner. We give a general introduction into the research area of fair exchange and discuss several formalizations of fairness. We find that, although a considerable number of fair exchange protocols exist, they usually have been defined for special scenarios and thus only work under particular assumptions. Furthermore, these protocols provide different degrees of fairness and cause different communication overhead. To alleviate this, we present a generalizing framework defining a suite of protocol modules which allows us to implement different fair exchange protocols. Depending on the properties of the exchanged items an appropriate fair exchange protocol can be selected and applied. Our study is accompanied by a comprehensive survey of the relevant literature.