hivehook / sdk
Official Hivehook PHP SDK. Manage sources, destinations, subscriptions, applications, endpoints, and verify inbound webhook signatures.
v0.1.0
2026-05-16 07:51 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2026-05-16 08:34:31 UTC
README
Official PHP client for Hivehook, the self-hostable webhook gateway (inbound + outbound).
Install
composer require hivehook/sdk
Quick start
<?php use Hivehook\HivehookClient; $client = new HivehookClient( baseUrl: 'http://localhost:8080', apiKey: getenv('HIVEHOOK_API_KEY'), ); $source = $client->sources->create([ 'name' => 'Stripe production', 'slug' => 'stripe-prod', 'providerType' => 'stripe', 'verifyConfig' => ['secret' => 'whsec_...'], ]); printf("created source %s. POST webhooks to /ingest/%s\n", $source['id'], $source['slug']);
Webhook signature verification
use Hivehook\Webhook; $signature = $_SERVER['HTTP_X_HIVEHOOK_SIGNATURE']; $timestamp = (int) $_SERVER['HTTP_X_HIVEHOOK_TIMESTAMP']; $ok = Webhook::verify($body, 'your-signing-secret', $signature, $timestamp, 300);
Requirements
- PHP 8.1+
- ext-curl, ext-json
Documentation
See the full reference at hivehook.com/docs.
License
MIT. See LICENSE.