Hey @sophos707 - I think this post might help you:
Ignore that it's for Stripe, but within this post max_gb talks about how to create the webhook/endpoint and the variables that Stripe then sends into. this is essentially how to setup a Webhook using the API Action in SC.