Hello, I don't quite understand the webhook flow

  1. Your server POSTS a subscribe request to Twitch
  2. Twitch sends a GET request to your callback URL to verify it’s accessible (at this point you should verify it’s something you actually requested, if you blindly accept all requests it’d allow malicious devs to flood you with subscriptions to high traffic topics) and your server should respond with the hub.challenge that’s in the querystring.
  3. You can check to ensure the subscription has been created by using the Get Webhook Subscriptions endpoint Reference | Twitch Developers
  4. Twitch will send a POST request to your callback URL with notifications for the topic you subscribed to. When you get a notification you should verify the authenticity of it using the secret you provided when subscribing to that topic.

What triggers that whole process is entirely up to you, if you want to wait for a user to request and then subscribe to topics for that user then you can do that, or you can just subscribe to whatever topics you like.

Webhooks are newer, and PubSub is older, but they are completely different systems for different use cases. Neither is a replacement for the other.