Generally, you need to expose as REST API endpoint, based on your webhook service provider, this may have a specific URL format and endpoint type (generally a POST). So maybe refer to the documentation of your webhook service provider.
Some webhooks may also have certain requirements, such as a certain response time etc. Consuming the information sent, may require additional processing, that may need to be done outside of the REST endpoint that your webhook calls. This can be achieved using either Task Queues or Scheduled Events depending on your application.
Hope this helps!