Skip to content

LaraWebhookSecure Webhook Handling for Laravel

Validate signatures, manage retries, log events, and integrate popular services in minutes.

Quick Example ​

php
// routes/web.php
Route::post('/stripe-webhook', function () {
    $payload = json_decode(request()->getContent(), true);
    
    // Handle the event
    event(new StripeWebhookReceived($payload));
    
    return response()->json(['status' => 'success']);
})->middleware('validate-webhook:stripe');

What the middleware does automatically:

  • ✅ Validates the webhook signature
  • ✅ Logs the event to the database
  • ✅ Rejects duplicate webhooks (idempotency)
  • ✅ Returns 403 for invalid signatures
  • ✅ Returns 400 for malformed payloads

Supported Services ​

ServiceSignature HeaderStatus
StripeStripe-Signature✅ Built-in
GitHubX-Hub-Signature-256✅ Built-in
SlackX-Slack-Signature✅ Built-in
ShopifyX-Shopify-Hmac-Sha256✅ Built-in
CustomAny✅ Extensible

Released under the MIT License.