A webhook setup guide should distinguish saving a destination, receiving an initial connectivity event, receiving the intended authenticated event and completing the downstream business task. A green connection indicator can describe only one of those boundaries. Tell the reader which result the documented steps actually establish.
Begin with the supported product, event subscription, destination owner, environment and account authority. This guide uses a fictional event service and a local signature exercise. It registers no endpoint, sends no request and changes no product or account.
The integration matrix establishes fit and prerequisites. A setup acceptance record makes those conditions concrete for a particular subscription and its expected evidence.
Read the actual registration contract
GitHub’s webhook creation guide documents payload URL, content type, optional secret, event selection and active configuration. It also describes an initial ping after creation. These are GitHub’s documented setup details, not a universal schema for every event provider.
Record the actual provider’s delivery format and verification method. A form-encoded payload and a JSON request body require different interpretation. Preserve the signed representation required by the real protocol rather than reconstructing an attractive payload and assuming the original verification still applies.
Ask which event completes the customer’s intended test. A registration ping can establish something useful about the supported path without proving that the account is subscribed to the relevant business event or that a downstream record changed.
Use a complete fictional subscription record
Assume the invented service has an active subscription S1 for report.ready in its declared test environment. The customer-operated HTTPS receiver is receiver.sample.example; a separate authorized owner controls it. The service’s fictional signing convention authenticates the exact body with the local teaching key used below. This is not GitHub’s webhook protocol or a usable credential.
| Setup field | Declared teaching value | What the guide must establish |
|---|---|---|
| Subscription | S1, active in the test environment | Correct account and subscription, not a similarly named production object |
| Destination | https://receiver.sample.example/events | Approved receiver identity and supported connectivity |
| Event selection | report.ready only | The requested event is actually subscribed |
| Body | JSON with event, delivery and resource fields | Interpret the intended fields under the declared format |
| Verification | Fictional local HMAC convention | Inspect authentication before classifying the event |
| Completion promise | Intended event accepted by receiver | Does not claim the downstream business action completed |
Keep real secrets outside public examples and review records. A receiver owner can preserve an approved secret reference without sharing its value. The credential review applies to setup screenshots, request histories and copied headers as well as finished tutorial code.
Test four different outcomes
| Case | Teaching observation | Correct setup conclusion |
|---|---|---|
| A | Authenticated report.ready arrives for S1 | Intended event accepted under the fixture; business effect not established |
| B | Authenticated user.removed arrives | Hold for event/subscription mismatch |
| C | report.ready body has an invalid signature | Hold authentication; do not trust its apparent event name |
| D | Authenticated ping arrives | Connectivity check only; intended business event not established |
These cases are hypothetical. They prevent different success states from being renamed “working.” A receiver might return a response before an asynchronous business action finishes; the actual system contract determines what that response establishes. Do not infer a universal delivery or processing guarantee.
Replay only the declared fixture
The following complete standard-library example checks the four classifications without making a network request. Its public teaching key is deliberately nonfunctional. It is not a production receiver, a complete request validator or a provider-compatible signature implementation.
import hashlib, hmac, json
key = b"FICTIONAL_LOCAL_KEY_NOT_A_CREDENTIAL"
def signed(event):
body = json.dumps({"event": event, "delivery": "D1", "resource": "R1"},
sort_keys=True).encode()
signature = hmac.new(key, body, hashlib.sha256).hexdigest()
return body, signature
def classify(body, signature):
expected = hmac.new(key, body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(signature, expected):
return "held_signature"
event = json.loads(body)["event"]
if event == "ping":
return "ping_only"
if event != "report.ready":
return "held_event_not_subscribed"
return "accepted_event_not_business_completion"
body, signature = signed("report.ready")
assert classify(body, signature) == "accepted_event_not_business_completion"
other, other_signature = signed("user.removed")
assert classify(other, other_signature) == "held_event_not_subscribed"
assert classify(body, "0" * 64) == "held_signature"
ping, ping_signature = signed("ping")
assert classify(ping, ping_signature) == "ping_only"
print("4 local setup cases passed; no webhook or downstream action executed")All four checks pass for the displayed code. The result establishes agreement with the local convention and case table only. A real integration requires the provider’s supported authentication procedure, authorized destination testing and separate evidence for the intended business result.
Close setup without hiding the next boundary
Preserve subscription and destination references, environment, relevant provider documentation, sanitized request identity, event type, authentication result, receiver observation and unresolved downstream state. Keep the intended event and its delivery attempt separate so a retry is not automatically reported as another business outcome.
The acknowledgment failure-case guide examines the later processing boundary and repeated work. It cannot prove initial subscription configuration, just as an initial ping cannot establish idempotent business completion.
A later subscription edit needs a new relevant observation. An older accepted event cannot establish that a changed receiver, event selection or account context still works. Preserve the earlier receipt and identify the new configuration revision instead of replacing the old reference while reusing its success label.
Have a different reviewer follow the final instructions using the approved test path. Recheck when event names, formats, signing methods, environments or receiver ownership change. Release when the user can state exactly which setup boundary passed and which further task still needs evidence.
