PHPackages                             juststeveking/webhooks - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. juststeveking/webhooks

ActiveLibrary[HTTP &amp; Networking](/categories/http)

juststeveking/webhooks
======================

The simplest way to start sending webhooks in PHP.

0.0.2(3y ago)49MITPHPPHP ^8.2

Since Mar 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JustSteveKing/webhooks)[ Packagist](https://packagist.org/packages/juststeveking/webhooks)[ GitHub Sponsors](https://github.com/JustSteveKing)[ RSS](/packages/juststeveking-webhooks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

Webhooks
========

[](#webhooks)

[![Latest Version](https://camo.githubusercontent.com/6b975b7f7a23578cde88a2e0d48d647c62aba2e3939784e8f7e4ae37a0b96dfa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75737473746576656b696e672f776562686f6f6b732e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/juststeveking/webhooks)[![Software License](https://camo.githubusercontent.com/0b0b61f22dc1dfbd28abf6e32f23a11c67c3cd2df76d969ac4b969bddc17c46c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a75737473746576656b696e672f776562686f6f6b732e7376673f7374796c653d666c61742d737175617265)](https://github.com/juststeveking/webhooks/blob/main/LICENSE.md)[![Run Tests](https://github.com/JustSteveKing/webhooks/actions/workflows/tests.yml/badge.svg)](https://github.com/JustSteveKing/webhooks/actions/workflows/tests.yml)[![PHP Version](https://camo.githubusercontent.com/a972ea60b084c48dbaf042e0140849782b99daee6576b85dd44ef7d20273b19c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a75737473746576656b696e672f776562686f6f6b732e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Total Downloads](https://camo.githubusercontent.com/ea8fba6d6e17aca6d31a8fc8dacfe8c6daa119a79e24f254fc6098091540965b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75737473746576656b696e672f776562686f6f6b732e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6d656469756d76696f6c6574726564)](https://packagist.org/packages/juststeveking/webhooks)

The simplest way to start sending webhooks in PHP.

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

[](#installation)

You can install this library using composer:

```
composer require juststeveking/webhooks
```

The next step is to install a OSR compliant package to do the request itself, you will need:

- PSR 7 Request Library
- PSR17 Request and Stream Factories
- PSR18 Http Client

This package will auto-discover these packages you have installed for you, so you not need to wire anything up.

Usage
-----

[](#usage)

This package is super simple to get started with, all you need to do is build one class and you can start sending webhooks.

```
use JustSteveKing\Webhooks\Webhook;

class YourWebhook extends Webhook
{
    public function headers(): array
    {
        $signature = hash_hmac(
            algo: 'sha256',
            data: \Safe\json_encode(
                value: $this->buildPayload(),
                flags: JSON_THROW_ON_ERROR,
            ),
            key: 'Your signing key goes here',
        );

        return [
            'Content-Type' => 'application/json',
            'Signature' => $signature,
        ];
    }

    public function buildPayload(): array
    {
        return [
            'foo' => 'bar',
        ];
    }

    public function url(): string
    {
        return 'Your URL goes here.';
    }

    public function method(): Method
    {
        return Method::POST;
    }

    public function plugins(): array
    {
        return [];
    }
}
```

The HTTP Client used for sending your HTTP requests supports plugins, you can [see how these work here](https://docs.php-http.org/en/latest/plugins/index.html).

Tests
-----

[](#tests)

There is a composer script available to run the tests:

```
composer test
```

However, if you are unable to run this please use the following command:

```
./vendor/bin/pest
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87fe82b349821ebd49cf57d65c4cd3e33ae0833222a8438d90fe8921ca899ea?d=identicon)[JustSteveKing](/maintainers/JustSteveKing)

---

Top Contributors

[![JustSteveKing](https://avatars.githubusercontent.com/u/6368379?v=4)](https://github.com/JustSteveKing "JustSteveKing (6 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/juststeveking-webhooks/health.svg)

```
[![Health](https://phpackages.com/badges/juststeveking-webhooks/health.svg)](https://phpackages.com/packages/juststeveking-webhooks)
```

###  Alternatives

[friendsofsymfony/http-cache

Tools to manage HTTP caching proxies with PHP

36114.7M36](/packages/friendsofsymfony-http-cache)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)[php-http/multipart-stream-builder

A builder class that help you create a multipart stream

29390.9M224](/packages/php-http-multipart-stream-builder)[php-http/httplug-bundle

Symfony integration for HTTPlug

38921.0M54](/packages/php-http-httplug-bundle)[geocoder-php/common-http

Common files for HTTP based Geocoders

18722.1M64](/packages/geocoder-php-common-http)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
