In the distributed development of modern IT systems, contracts play a vital role in ensuring interoperability of components and adherence to specifications. The design of embedded systems, however, is made more complex by the heterogeneous nature of components, which are often described using different models and interaction mechanisms. Composing such components is generally not well-defined, making design and verification difficult. Several denotational frameworks have been proposed to handle heterogeneity using a variety of approaches. However, the application of heterogeneous modeling frameworks to contract-based design has not yet been investigated.In this work, we develop an operational model with precise heterogeneous denotational semantics, based on tag machines, that can represent heterogeneous composition, and provide conditions under which composition can be captured soundly and completely. The operational framework is implemented in a prototype tool which we use for experimental evaluation. We then construct a full contract model and introduce heterogeneous composition, refinement, dominance, and compatibility between contracts, altogether enabling a formalized and rigorous design process for heterogeneous systems. Besides, we also develop a generic algebraic method to synthesize or refine a set of contracts so that their composition satisfies a given contract.