Laravel Webhook Server
Configure and send signed, retryable webhooks from Laravel applications with ease.
Repository Health
Technical Analysis
Laravel Webhook Server, by Spatie, makes it easy to send webhooks from a Laravel app. A webhook is an HTTP request one app sends to notify another about an event, and this package handles the reliable delivery of those requests for you.
It supports cryptographically signing payloads so receivers can verify authenticity, dispatching calls through Laravel’s queue, and automatically retrying failed calls with configurable backoff strategies. A fluent WebhookCall builder configures each webhook, and events fire on success or final failure.
What You Get
- A fluent
WebhookCallbuilder to configure URL, payload, secret, and headers - Payload signing so receivers can verify the request came from you
- Queued delivery via Laravel jobs so webhooks don’t block requests
- Configurable retry counts and pluggable backoff strategies
- Events dispatched on successful delivery and on final failure
Common Use Cases
- Notifying third-party systems when an event happens in your app
- Powering a public webhook API for your SaaS customers
- Reliably delivering event notifications with automatic retries
- Signing outgoing payloads so receivers can trust their origin
Under The Hood
Architecture
The entry point is the WebhookCall builder, which collects configuration (URL, payload, secret, signer, HTTP verb, timeout, retry policy) and dispatches a CallWebhookJob onto Laravel’s queue. The job performs the HTTP request via Guzzle, computes a signature using a pluggable Signer over the payload and secret, and on failure re-dispatches itself according to a BackoffStrategy up to the configured number of tries. Terminal outcomes fire WebhookCallSucceededEvent or FinalWebhookCallFailedEvent, and a meta bag lets you attach context that flows through to those events.
Tech Stack
100% PHP built on Laravel’s queue, events, and HTTP client (Guzzle). Distributed via Composer as spatie/laravel-webhook-server, it publishes a config file for defaults like signer, timeout, tries, and backoff. Tests run under Pest/PHPUnit.
Code Quality
The package follows Spatie’s well-known standards: a focused src/ layout (WebhookCall, CallWebhookJob, Signer, BackoffStrategy, Events, Exceptions), a full test suite in CI, and 50+ tagged releases since 2019. Interfaces for the signer and backoff strategy make the delivery behavior cleanly extensible.