When Y Combinator startups make their first sales, we provide them with a sales template to make the legal part easy. In 2015, Y Combinator open sourced its sales template for the benefit of all startups.
The sales template here is specially tailored for software-as-a-service (SaaS) startups – i.e. companies who charge for cloud software on a subscription basis. You should consider YC's template as a starting point and customize it to meet your needs. We've highlighted the areas that in our experience are most likely to vary startup to startup.