This paper develops a model of dynamic pricing with endogenous intertemporal demand. In the model, there is a monopolist who sells a finite inventory over a finite time horizon. The seller adjusts prices dynamically to maximize revenue. Customers arrive continually over the duration of the selling season. At each point in time, customers may purchase the product at current prices, remain in the market at a cost to purchase later, or exit, and they wish to maximize individual utility. The customer population is heterogeneous along two dimensions: they may have different valuations for the product and different degrees of patience (waiting costs).We demonstrate that heterogeneity in both valuation and patience is important because they jointly determine the structure of optimal pricing policies. In particular, when high-value customers are proportionately less patient, markdown pricing policies are effective because the high-value customers would buy early at high prices while the low-value customers are willing to wait (i.e., they are not lost). On the other hand, when the high-value customers are more patient than the low-value customers, prices should increase over time to discourage inefficient waiting. Contrary to intuition, we find that strategic waiting by customers may sometimes benefit the seller: when low-value customers wait, they compete for availability with high-value customers and thus increase their willingness to pay. Our results also shed light on how the composition of the customer population affects optimal revenue, consumer surplus, and social welfare. Finally, we consider the long-run problem of selecting the optimal initial stocking quantity.