Microeconomic evidence reveals a direct link between firms' current earnings and their access to debt. This paper studies macroeconomic implications of earnings-based borrowing constraints. In a macro model, firms with earnings-based constraints borrow more in response to positive investment shocks, whereas firms with collateral constraints borrow less. Empirically, aggregate and firm-level credit responds to identified investment shocks according to the predictions with earnings-based constraints. Moreover, with sticky prices, earnings-based constraints imply that supply shocks are quantitatively more important. This is validated in an estimated version of the model, highlighting the importance of carefully modeling credit constraints to understand policy trade-offs. (JEL E22, E32, G31, G32)