Skip to content
E Webhook Package Documentation

Installation

Installation

RelayKit can be installed with Composer.

composer require relaykit/relaykit-php

The package supports PHP 8.2 and above.

Laravel setup

RelayKit includes optional Laravel integration.

Publish the configuration file:

php artisan vendor:publish --tag=relaykit-config

Publish and run the migrations:

php artisan vendor:publish --tag=relaykit-migrations
php artisan migrate

Plain PHP setup

For non-Laravel projects, create a RelayKit instance manually:

use RelayKit\RelayKit;

$relay = RelayKit::make()
    ->withSecret($_ENV['WEBHOOK_SECRET'])
    ->withStorage($storage)
    ->withDispatcher($dispatcher);

Configuration file

The Laravel configuration file is published to config/relaykit.php.

return [
    'route_prefix' => 'webhooks',
    'queue' => 'webhooks',
    'store_payloads' => true,
    'providers' => [
        'stripe' => App\Webhooks\Providers\StripeProvider::class,
    ],
];

Next step

Continue with your first webhook.

© Webhook Package Documentation