Recent initiatives to improve healthcare quality and reduce costs have centered around payment mechanisms and IT-enabled health information exchanges (HIEs). Such initiatives profoundly influence both providers’ choices in terms of healthcare effort levels and HIE adoption and patients’ choice of providers. Using a game-theoretical model of a healthcare setup, we examine the role of payment models in aligning providers’ and patients’ incentives for realizing socially optimal (i.e., first-best) choices. We show that the traditional fee-for-service (FFS) payment model does not necessarily induce the first-best solution. The pay-for-performance (P4P) model may induce the first-best solution under some conditions if provider switching by patients during a health episode is socially suboptimal, making provider coordination less of an issue. We identify an episode-based payment (EBP) model that can always induce the first-best solution. The proposed EBP model reduces to the P4P model if the P4P model induces the first-best solution. In other cases, the first-best inducing EBP model is multilateral in the sense that the payment to a provider depends not only on the provider’s own efforts and outcomes but also on those of other providers. Furthermore, the payment in this EBP model is sequence dependent in the sense that payment to a provider is contingent upon whether the patient visits a given provider first or second. We show that the proposed EBP model achieves the lowest healthcare cost, not necessarily at the expense of care quality or provider payment, relative to FFS and P4P. Although our proposed contract is complex, it sets an optimality baseline when evaluating simpler contracts and also characterizes aspects of payment that need to be captured for socially desirable actions. We further show that the value of HIEs depends critically on the payment model as well as on the social desirability of patient switching. Under all three payment models, the HIE value is higher when switching by at least some patients is desirable than when switching by any patient is undesirable. Moreover, the HIE value is highest under the FFS model and lowest under the P4P model. Hence, assessing the value of HIEs in isolation from the underlying payment mechanism and patient-switching behavior may result in under- or overestimation of the HIE value. Therefore, as payment models evolve over time, there is a real need to reevaluate the HIE value and the government subsidies that induce providers to adopt HIEs.