veriface / veriface
Implements current VeriFace API
1.0
2023-04-06 15:32 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
This package is not auto-updated.
Last update: 2026-03-21 05:18:38 UTC
README
Implements current VeriFace API
Requirements
- PHP 7.4 or newer
- ext-curl
- ext-json
Installation
Install the package via composer.
composer require veriface/veriface
Installation using archive:
- Download and extract archive file
- Include
VeriFace.autoload.phpto your project
Contributing
Please contact us: https://veriface.eu/contact/
Usage
Basic initialization
$vf = veriface\VeriFace::byApiKey('INSERT_YOU_API_KEY'); //Will immediately die without exception on curl error, if false the veriface\VeriFaceApiException is thrown (default: false) $vf->setDieOnCurlError(true);
Create verification
$created = $vf->createVerification('LINK_LONG'); $created->openCode; //Redirect to verification application with the openCode parameter $created->sessionId; //Session ID of created verification
Create verification with custom reference ID combined with email invitation
$created = $vf->createVerification('INVITE_EMAIL', null, null, null, 'primary_id_from_your_system', 'example@example.org', null, [new veriface\dto\ExtendedReferenceDto('CUSTOMER_ID', 'test')]);
Find verification by reference
There could be multiple verifications with the same reference.
$verifications = $vf->findVerificationsByExtendedReference('CUSTOMER_ID', 'test'); //or $verifications = $vf->findVerificationsByReferenceId(primary_id_from_your_system); //or $verifications = $vf->findVerificationsByExtendedReference('PRIMARY', 'primary_id_from_your_system');
Get verification details with localized indicators
$vf = veriface\VeriFace::byApiKey('INSERT_YOU_API_KEY'); $verification = $vf->getVerification('SESSION_ID', 'en_GB');
Process webhook event
$eventResult = $vf->processVerificationWebhook(file_get_contents('php://input')); $verification = $vf->getVerification($eventResult->sessionId, 'en_GB');
Monitoring details
$monitoringData = $vf->getVerificationMonitoringData('SESSION_ID');
License
The MIT License (MIT). Please see LICENSE for more information.