This paper presents an approach for the specification and implementation of business contracts needed for Business-to-Business (B2B) services. We first examine typical elements of business contracts and their usage. This analysis sets a foundation for 1) modeling contracts and 2) developing a role-based architecture that supports typical operations in the contract's lifetime. We then explore how contracts can be encoded in XML and present an approach for monitoring and enforcing of contracts. This approach provides a flexible way of modifying rules of enforcement, as trading arrangements change. A real-world contract example is used to illustrate the concepts described.