Refactored code for handling different provider webhooks from
lib/routes.js into lib/hooks.js