Official Hivehook PHP SDK. Manage sources, destinations, subscriptions, applications, endpoints, and verify inbound webhook signatures.

Maintainers

Package info

github.com/hivehook/sdk-php

Homepage

Documentation

pkg:composer/hivehook/sdk

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-05-16 07:51 UTC

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.