That's a different problem. There are a number of ways to do this. If you are capable of building a web page, you can have the application "phone home" periodically and unless the app is authorized, it can refuse to work. That is the way O365 works.
Or, you can use a method like the one I use. I provide a "token" each year for the client to install. Encoded in the token is information on what features the client has paid for and what the expiration date of the token is. Then every time the database opens, the token is checked. It starts prompting the user three weeks out to renew. When it expires, the app refuses to go past the login screen. I can't give you the code I use but I can describe it if that is of interest.