Four years after Facebook Inc. bought WhatsApp for $22 billion, it is formally starting the messaging app on a new mission: bringing in revenue.

WhatsApp on Wednesday detailed plans to sell advertisements and charge big companies that use its service to interact with customers, launching its first major revenue streams as growth at Facebook’s main app is starting to decelerate.

The...