← The Signal

Before an AI Agent Acts on a Webhook, Verify Who Sent It

An incoming notification can trigger a real commitment. Establish its origin before asking an assistant to interpret it.

By · AI-assisted editorial · Method & corrections

Kooya mascot checks a sealed incoming message at a cream mailroom counter with black delivery chutes. Conceptual illustration.FIELD NOTE / AI webhook authentication Philippines
EXECUTIVE SIGNALS
  • Authenticate incoming events before model processing or consequential actions.
  • Check the original body using the correct endpoint secret and provider method.
  • Separate delivery authenticity, replay protection and business authority.
  • Test failed verification and secret rotation before production handover.
01

Start at the point where outside data becomes work

Consider a hypothetical Philippine service company whose assistant receives booking notifications, drafts customer messages and prepares staff assignments. If its public intake endpoint accepts any plausible booking object, a fabricated notification could create work that nobody requested. The model might produce an excellent summary of an event that should never have entered the system.

Kooya recommends drawing the boundary before choosing prompts: an outside request arrives, the application authenticates the delivery, checks its permitted scope, and only then creates internal work. List every downstream effect, including messages, record changes and model calls. Verification should happen before those effects, not as a final review after the assistant has already acted.

Ask the supplier to demonstrate this boundary with an invalid delivery. The useful evidence is that no agent task or customer action was created. A warning in a log is insufficient if the request continued through the workflow.

02

Verify the delivery using the provider’s actual contract

GitHub documents signature verification before further processing, using a webhook secret and the payload contents. Its guidance specifies HMAC verification and a constant-time comparison, and warns against putting the secret into a repository. These are implementation requirements for that provider, not a universal header recipe for every service.[1]

Stripe’s troubleshooting guidance requires the unchanged request body, the signature header and the correct endpoint secret. Parsing or modifying the body first can break verification. It also distinguishes secrets used for CLI-forwarded deliveries from those for Dashboard-managed endpoints.[2]

Kooya recommends a connector-specific acceptance checklist: provider, endpoint, environment, verification library and secret owner. Test the actual deployed route, including any proxy or middleware that handles the request. Do not “fix” a verification failure by allowing unsigned requests while the rest of the integration is completed.

Keep verification secrets out of model context and routine diagnostic output. Operators need to identify which configured credential version was used, not read the credential itself. Give troubleshooting access deliberately and record who owns recovery when verification starts failing.

03

Treat freshness and duplicate processing as different checks

Stripe includes a timestamp in its signed payload to help mitigate replay attacks. Its libraries use a default five-minute tolerance; setting tolerance to zero disables that recency check. Stripe also generates a new timestamp and signature when retrying a delivery. These documented behaviours illustrate why freshness and duplicate handling are separate concerns.[3]

For each connector, ask what prevents a captured delivery being accepted later and what prevents accepted work being performed twice. Do not assume every provider signs timestamps or uses the same tolerance. Document the supported mechanism and test it without copying settings from an unrelated integration.

This guide addresses admission into the workflow. Once an authentic event is admitted, the application still needs its existing controls for retries and duplicate actions. A delivery can be authentic and recent while referring to work already completed. Preserve that distinction in both monitoring and operator instructions.

Use our AI workflow retries guide for the separate controls that prevent an accepted event from repeating a business action.

04

Keep authenticated content within its business permissions

After verification, check whether the event belongs to the expected account, environment and event category using the provider’s documented fields and configuration. A test notification should not create a production booking. An event handled for one customer must not be routed into another customer’s workspace simply because an extracted name looks similar.

Kooya recommends mapping allowed event categories to explicit internal tasks. A booking-created event might permit preparing an assignment proposal; it should not silently grant permission to refund a payment or export customer records. The receiving application owns that mapping, with ordinary approval rules still applying to consequential changes.

Free-text fields remain content to interpret. A customer note delivered through a legitimate service can contain irrelevant requests or attempts to redirect the assistant. Successful transport verification does not promote that note into a system instruction. Keep the assistant’s permitted tools and data access narrower than whatever the message happens to request.

05

Rehearse failure and hand over an operating procedure

Build a small acceptance exercise covering a missing signature, a modified body, the wrong configured secret, an unexpected event category and an event from the wrong environment. Where the provider supports signed freshness checks, include an expired delivery. Add a valid event to prove that the workflow can accept legitimate work as well as reject bad input.

Kooya recommends rehearsing secret replacement with the provider’s supported transition procedure. Confirm that the new configuration accepts valid deliveries and that the retired secret no longer works after the intended transition. Name the person who can recover the connector; otherwise a routine credential change can become an unexplained operations outage.

Finally, separate verification failures from processing failures in reporting. Record enough non-sensitive detail to investigate the provider, time and rejection reason without turning logs into an unnecessary copy of every customer message. Give operations staff a clear escalation route. A trustworthy intake boundary should be visible in a demonstration and maintainable after the delivery team leaves.

FREQUENT SIGNALS

QUESTIONS PEOPLE ACTUALLY ASK.

Does a valid signature authorise an AI agent to act?

No. It verifies the delivery under the provider’s mechanism. Account scope, event routing and business approval remain separate checks.

Can we parse JSON before verifying it?

Follow the provider’s requirements. Where verification requires the original body, preserve it before any parsing or transformation and use it for the signature check.

Does freshness checking prevent duplicate actions?

No. A legitimate retry can have a fresh signature. Track accepted work and apply the workflow’s duplicate-action controls separately.

What should happen when verification fails?

Reject the request from the business workflow and investigate through an owned operational process. Do not send it to the model to decide whether it looks legitimate.

SOURCE DESK

PRIMARY SOURCES, NOT VIBES.

  1. Validating webhook deliveriesGitHub Docs · Reviewed 10 November 2026
  2. Manage webhook endpoints: resolve signature verification errorsStripe documentation · Reviewed 10 November 2026
  3. Receive Stripe events in your webhook endpointStripe documentation · Reviewed 10 November 2026
FROM READING TO BUILDING

MAKE THE WORK MOVE.

KEEP FOLLOWING THE SIGNAL