Payment methods based on a fixed price per diagnosis related group provide hospitals with a perfect incentive for cost reduction. However, costs can rise for some hospitals because of exogenous factors. This situation may bring them to select patients and lower care quality to avoid bankruptcy. To prevent this, payments should allow for legitimate sources of cost heterogeneity. It is possible to design a payment method which allows for unobservable sources of cost heterogeneity, provided they are time invariant. While it reimburses hospitals for extra costs resulting from undesirable long-term moral hazard, this method can induce substantial savings because it provides incentives to reduce costs linked to transitory moral hazard.