1. Go to this page and download the library: Download frain/convoy 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/ */
frain / convoy example snippets
use Convoy\Client\Api\EventsApi;
use Convoy\Client\Configuration;
use Convoy\Client\Model\ModelsCreateEvent;
$config = (new Configuration())
->setHost('https://us.getconvoy.cloud/api')
->setAccessToken($apiKey); // the client adds the Bearer prefix
// Pin the API version this client was generated from.
$http = new \GuzzleHttp\Client([
'headers' => ['X-Convoy-Version' => '2025-11-24'],
]);
$events = new EventsApi($http, $config);
$events->createEndpointEvent($projectId, (new ModelsCreateEvent())
->setEndpointId('endpoint-id')
->setEventType('invoice.paid')
->setData(['amount' => 100, 'currency' => 'USD']));
use Convoy\Convoy;
$convoy = new Convoy([
"uri" => "https://us.getconvoy.cloud/api/v1",
"api_key" => "your_api_key",
"project_id" => "your_project_id"
]);