We develop a flexible and tractable framework of (secret) vertical contracting between multiple upstream suppliers and downstream retailers. This framework does not put any restriction on the tari¤s that can be negotiated, and yet does take account of the impact of these tariffs on downstream firms'behavior. We show that equilibrium tariffs must be cost-based; as a result, retail prices are the same as with a multi-brand oligopoly. Interestingly, this finding is in line with the empirical analysis of a recent Norwegian merger. We then use this flexible framework to endogenize market structure as well as to analyze the e¤ects of various vertical restraints, such as resale price maintenance and retail price parity clauses. Finally, we show that our framework also applies to the agency relationships that characterize most online platforms.