This paper optimizes dynamic pricing and real-time resource allocation policies for a platform facing nontransferable capacity, stochastic demand-capacity imbalances, and strategic customers with heterogenous price and time sensitivities. We characterize the optimal mechanism, which specifies a dynamic menu of prices and allocations. Service timing and pricing are used strategically to: (i) dynamically manage demand-capacity imbalances, and (ii) provide discriminated service levels. The balance between these two objectives depends on customer heterogeneity and customers' time sensitivities. The optimal policy may feature strategic idlenexss (deliberately rejecting incoming requests for discrimination), late service prioritization (clearing the queue of delayed customers), and deliberate late service rejection (focusing on incoming demand by rationing capacity for delayed customers). Surprisingly, the price charged to time-sensitive customers is not increasing with demand-high demand may trigger lower prices. By dynamically adjusting a menu of prices and service levels, the optimal mechanism increases profits significantly, as compared with dynamic pricing and static screening benchmarks. We also suggest a less information-intensive mechanism that is history-independent but fine-tunes the menu with incoming demand; this easier-to-implement mechanism yields close-to-optimal outcomes.