PHPackages                             ayodvr/laravel-webhook-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ayodvr/laravel-webhook-manager

ActiveLibrary[API Development](/categories/api)

ayodvr/laravel-webhook-manager
==============================

A reusable package for Laravel that allows developers to receive, process, and manage incoming webhooks reliably.

v1.2.0(5mo ago)14MITBladePHP ^8.2

Since Nov 16Pushed 1mo agoCompare

[ Source](https://github.com/ayodvr/laravel-webhook-manager)[ Packagist](https://packagist.org/packages/ayodvr/laravel-webhook-manager)[ Docs](https://github.com/ayodvr/laravel-webhook-manager)[ RSS](/packages/ayodvr-laravel-webhook-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (6)Used By (0)

Laravel Webhook Manager
=======================

[](#laravel-webhook-manager)

[![Latest Stable Version](https://camo.githubusercontent.com/47e9dd7838a03a2797d23782661a87f6a3e98025fd385ac81af4f0a8684bd9be/68747470733a2f2f706f7365722e707567782e6f72672f61796f6476722f6c61726176656c2d776562686f6f6b2d6d616e616765722f762f737461626c65)](https://packagist.org/packages/ayodvr/laravel-webhook-manager)[![Total Downloads](https://camo.githubusercontent.com/cf96a26bdfa8671a780397cdfa0bc0a9b772d8884d30f03b21dd832e02b8beda/68747470733a2f2f706f7365722e707567782e6f72672f61796f6476722f6c61726176656c2d776562686f6f6b2d6d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/ayodvr/laravel-webhook-manager)[![License](https://camo.githubusercontent.com/c96cb0590f7a9a18b8a945d0bd4c3dc8f3570c24b65e746c288774f417dbecd6/68747470733a2f2f706f7365722e707567782e6f72672f61796f6476722f6c61726176656c2d776562686f6f6b2d6d616e616765722f6c6963656e7365)](https://packagist.org/packages/ayodvr/laravel-webhook-manager)

A reusable Laravel package for receiving, processing, and managing incoming webhooks reliably. It handles webhooks from multiple providers, prevents duplicates, and ensures high reliability for critical backend systems.

Features
--------

[](#features)

- **Signature Verification**: Ensures incoming requests are authentic using HMAC-SHA256.
- **Automatic Duplicate Prevention**: Uses unique provider IDs (Stripe ID, GitHub Delivery ID, etc.) or signatures to prevent duplicate processing.
- **Reliable Processing**: Queue-based asynchronous processing with automatic status tracking and retries.
- **Event Dispatching**: Fires Laravel events (`WebhookReceived`) for easy integration.
- **Configurable**: Customizable route prefix, retry intervals, queue names, and signature secrets.
- **Multiple Providers**: Built-in support for Paystack, Stripe, PayPal, GitHub, and more.
- **Interactive Demo**: Includes a built-in dashboard to simulate and monitor webhooks.

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- **PHP**: ^8.2
- **Laravel**: ^10.0 || ^11.0 || ^12.0

### Via Composer

[](#via-composer)

```
composer require ayodvr/laravel-webhook-manager
```

### Publish Configuration

[](#publish-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=webhook-config
```

### Publish Migration

[](#publish-migration)

Run the migration to create the webhook events table:

```
php artisan migrate
```

Set your webhook signature secret in your `.env` file:

```
WEBHOOK_SIGNATURE_SECRET=your-secret-key-here
```

Interactive Demo
----------------

[](#interactive-demo)

The package comes with a built-in demo dashboard to help you test and visualize the webhook flow.

1. **Start the server**: ```
    php artisan serve
    ```
2. **Access the dashboard**: Navigate to `http://127.0.0.1:8000/demo` in your browser.
3. **Simulate Webhooks**: Click the **"Simulate Paystack Payment"** button to trigger a mock signed webhook and watch it process in real-time.

Usage
-----

[](#usage)

### Receiving Webhooks

[](#receiving-webhooks)

Webhooks are automatically handled at the `/webhooks/{provider}` route (configurable via `route_prefix`). For example:

- Paystack: `POST /webhooks/paystack`
- Stripe: `POST /webhooks/stripe`
- PayPal: `POST /webhooks/paypal`

### Listening to Webhooks

[](#listening-to-webhooks)

Listen to the `WebhookReceived` event in your `EventServiceProvider` or using a Listener:

```
