Contract farming is frequently considered as an appropriate mechanism for integrating smallholders into dynamic markets. We discuss the rationale for the variety in contractual arrangements between small-scale producers and agro-processing firms in the Northern and Central region of Costa Rica. Different market configurations give rise to delivery conditions, ranging from spot market negotiations to verbal or written contracts. We analyse which types of farmers are typically engaged in each of these contractual arrangements, and what are the implications for their production and investment decisions. Main attention is given to the effects of institutional organization for equity, efficiency and sustainability. The analysis is based on detailed case studies for two non-traditional commodities (pepper and chayote). Results suggest that contracts provide an important insurance device for farmers meeting investment and information constraints, and offer incentive for more intensive input use. This suggests that contract farming may be a critical requirement enabling smallholders to enter into specialized markets.