Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Webhooks For Laravel

Webhooks For Laravel Laravel Package

pushery/webhooks-for-laravel

View on GitHub
Deep Wiki
Context7

An all-in-one, config-gated Laravel toolkit for signed inbound and outbound webhooks, customer-managed endpoints, and delivery observability

Frequently asked questions about Webhooks For Laravel
How do I send a signed webhook in Laravel using this package?
Use `Webhook::send()` with your event name, payload, and recipient URL. Configure signing in `config/webhooks.php`—default is HMAC, but Ed25519 is optional. Example: `Webhook::send('order_created', ['data' => $order], 'https://customer.com/webhooks')`. The package auto-signs payloads based on your config.
Does this package support Ed25519 signing for webhooks?
Yes, but it requires PHP’s `sodium` extension or the `paragonie/sodium_compat` package. Enable it in `config/webhooks.php` with `signature_method => 'ed25519'`. HMAC is the fallback if sodium isn’t available. Check your PHP environment first—Ed25519 isn’t enabled by default everywhere.
Can I use this for inbound webhooks (e.g., Stripe, GitHub) in Laravel?
Absolutely. Define routes with `Route::webhook('stripe', StripeHandler::class)` and attach a handler class. The package verifies signatures automatically (HMAC or Ed25519) and validates payloads against schemas if configured. Works seamlessly with Laravel’s middleware and queues.
What Laravel versions does this package support?
The package is optimized for Laravel 10+ and requires PHP 8.1+. It follows Laravel’s conventions (e.g., `Route::webhook()`, `Webhook::send()`), so it integrates cleanly with newer Laravel features like model binding, middleware, and queues. Always check the `composer.json` for minor version constraints.
How do I handle webhook retries or idempotency?
The package doesn’t enforce idempotency keys, but you can implement retries using Laravel’s `ShouldQueue` interface with `uniqueForJob()`. For example, queue the webhook job and set `uniqueForJob()` to a payload hash. Combine this with exponential backoff for resilience. No built-in retry logic—it’s up to your job implementation.
Is there a dashboard to monitor webhook deliveries?
Yes, the package includes a Blade/Livewire dashboard for tracking deliveries, failures, and retries. It logs all events to the database by default. For headless APIs, you can disable the dashboard or replace it with an API-driven UI (e.g., Inertia.js). The dashboard is optional—enable it via `webhooks:dashboard` config.
Can customers self-manage their webhook endpoints in my app?
Yes, the package provides a `WebhookEndpoint` resource for customer-managed URLs. Extend it with Laravel’s resource controllers or APIs (e.g., Sanctum/Passport for auth). Customers can register, update, or delete their endpoints via your UI or API. Works well for SaaS multi-tenancy scenarios.
How do I validate inbound webhook payloads against a schema?
Use the `validatePayload()` method in your handler or leverage `spatie/laravel-json-schema-validator` for strict schema validation. Define schemas in `config/webhooks.php` under `schema_paths`. Example: `Webhook::validatePayload($payload, 'stripe_events_schema.json')`. Supports JSON/XML/NDJSON payloads.
What if I need to integrate with existing monitoring tools (e.g., Datadog, Sentry)?
The package logs deliveries to Laravel’s log channel (default: `single`). For custom monitoring, tap into the `webhook.delivered` and `webhook.failed` events. Example: `Event::listen(WebhookDelivered::class, function ($event) { Log::to('datadog')->info($event->payload); })`. Works with any log driver or alerting system.
Are there alternatives to this package for Laravel webhooks?
Yes, alternatives include `spatie/laravel-webhooks` (simpler, no dashboard) and `fruitcake/laravel-webhooks` (focused on inbound hooks). This package stands out for its modularity (config-gated layers), built-in dashboard, and support for both inbound/outbound hooks with advanced signing (Ed25519). Choose based on whether you need self-service endpoints or observability features.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle