1. Go to this page and download the library: Download hivehook/sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hivehook / sdk example snippets
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']);