The official PHP library for integrating with the ComplyCube API.
Get started with our API integration docs and check out our full API reference.
PHP 7.4.
$ composer require complycube/complycube
Use composers generated loader.
require_once __DIR__ . '/vendor/autoload.php';
Initialise the ComplyCubeClient with the API key from your developer dashboard.
use ComplyCube\ComplyCubeClient;
$complycube = new ComplyCubeClient($apiKey);
Create a new client and complete a check
$newclient = $complycube->clients()->create([
'type' => 'person',
'email' => '[email protected]',
'personDetails' => ['firstName' => 'John',
'lastName' => 'Smith']]);
$result = $complycube->checks()->create($newclient->id,
['type' => 'extensive_screening_check']);
ComplyCube uses webhooks to notify your application when an event happens in your account.
You can use the EventVerifier to validate the messages sent to your application.
$verifier = new \ComplyCube\EventVerifier('WEBHOOK_SECRET');
$event = $verifier->constructEvent($data, $headers[SIGNATURE_KEY]);
Check out the Webhooks guide
When you’re done developing your ComplyCube integration and you’re ready to go live, refer to this checklist to ensure you have covered all critical steps.