Financing through crowdfunding is growing rapidly, especially for start-ups. Investment financing via crowdfunding is integrated with the real side of the firm as future consumers may potentially provide all or part of the required resources. We derive the optimal pre-sale crowdfunding contract of a financially constrained monopolist and analyze its implications for production, investment and welfare. Crowdfunding contracts may serve as a price-discrimination mechanism, forcing pivotal consumers to pay a premium above the future spot price, thus increasing profits. When raising funds is costly, entrepreneurs balance the benefits from price discrimination against the costs of external financing, and respond to tighter financing constraints by decreasing the degree of price discrimination and increasing production. When crowdfunding is available, reducing the cost of capital, a common policy instrument used for spurring innovation, may unintentionally reduce production and welfare.