luciuz / idnow
IDnow API
Installs: 6 691
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^7.0
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2025-04-24 06:35:14 UTC
README
IDnow API for everyone!
Examples
Test
// init $idNow = new IdNow( 'companyid', 'API-KEY-TOKEN', 'https://gateway.test.idnow.de', 'v1', 'https://go.test.idnow.de' ); // create the ident $transactionId = 'rSRS6BcacTIm4hM94NleLM55x5jamuRI'; $params = [ 'birthday' => '1989-09-09', 'firstname' => 'X-AUTOTEST-HAPPYPATH', 'lastname' => 'Lastname', 'gender' => 'MALE', 'nationality' => 'RU', 'mobilephone' => '+79123456789', ]; $result = $idNow->create($transactionId, $params); // init test IdNowApi $idNowTest = new IdNowApi( 'companyid', 'API-KEY-TOKEN', 'https://api.test.idnow.de', 'v1', '' ); // start $result = $idNowTest->do("{$idNowTest->companyId}/identifications/$transactionId/start", []); // request video chat $result = $idNowTest->do("{$idNowTest->companyId}/identifications/$transactionId/requestVideoChat", []); // now we are ready to receive a webhook
Production
// init $idNow = new IdNow( 'companyid', 'API-KEY-TOKEN', 'https://gateway.idnow.de', 'v1', 'https://go.idnow.de' ); // create the ident $transactionId = 'rSRS6BcacTIm4hM94NleLM55x5jamuRJ' $params = [ 'birthday' => '1989-09-09', 'firstname' => 'Firstname', 'lastname' => 'Lastname', 'gender' => 'MALE', 'nationality' => 'RU', 'mobilephone' => '+79123456789', ]; $result = $idNow->create($transactionId, $params); // get estimated waiting time $estimatedWaitingTime = $idNow->estimatedWaitingTime(); // get ident url $url = $idNow->getUrl($transactionId); // open url in the iframe // [identification processs] // get result redirect // now we are ready to receive a webhook
Bonus
// download results as ZIP $result = $idNow->download($href, $dir); // retrieve results as JSON $result = $idNow->retrieve($transactionId);