The WooCommerce Software Add-on gives you the ability to manage license keys and activations via your store. Define your products as software via the edit product page, and after doing so lets you define software specific properties. Customers purchase software like any other product, but after doing so (when the order is completed) they will receive an auto-generated license key from the system within their order-complete email.

Order emails contain the key, activation email, and activations remaining. You can resend these emails using the in-built ‘send’ button in WooCommerce on the orders screen. If you ever introduce a paid upgrade for software you can define valid upgrade keys, and an upgrade price, which your customers can make use of. They will just have to enter their license details during their purchase. This extension comes with an API for generating keys, activating licenses, de-activating and resetting. This API can be integrated into your software/web app to validate licenses. See the documentation for more details on the API.