Documentation

Scanner

Table of Contents

$config  : mixed
$throwError  : mixed
__construct()  : void
Initialize ID Analyzer Scan API
quickScan()  : array<string|int, mixed>
Initiate a quick identity document OCR scan by providing input images.
restrictCountry()  : void
Check if the document was issued by specified countries. Separate multiple values with comma. For example "US,CA" would accept documents from the United States and Canada.
restrictState()  : void
Check if the document was issued by specified state. Separate multiple values with comma. For example "CA,TX" would accept documents from California and Texas.
restrictType()  : void
Check if the document was one of the specified types. For example, "PD" would accept both passport and driver license.
scan()  : array<string|int, mixed>
Initiate a new identity document scan & ID face verification transaction by providing input images.
setContractOptions()  : void
Automatically generate contract document using value parsed from uploaded ID
setCustomData()  : void
Set an arbitrary string you wish to save with the transaction. e.g Internal customer reference number
setParameter()  : void
Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions
setProfile()  : void
Set KYC Profile
setUserIP()  : void
Pass in user IP address to check if ID is issued from the same country as the IP address, if no value is provided http connection IP will be used.
throwAPIException()  : void
Whether an exception should be thrown if API response contains an error message
verifyUserInformation()  : void
Check if customer information matches with uploaded document

Properties

$config

private mixed $config = array("document" => "", "documentBack" => "", "face" => "", "faceVideo" => "", "profile" => "", "profileOverride" => array(), "verifyName" => "", "verifyDob" => "", "verifyAge" => "", "verifyAddress" => "", "verifyPostcode" => "", "verifyDocumentNumber" => "", "restrictCountry" => "", "restrictState" => "", "restrictType" => "", "ip" => "", "customData" => "", "client" => "php-sdk")

$throwError

private mixed $throwError = false

Methods

__construct()

Initialize ID Analyzer Scan API

public __construct() : void
Tags
throws
Exception
Return values
void

quickScan()

Initiate a quick identity document OCR scan by providing input images.

public quickScan(string $documentFront[, string $documentBack = "" ][, bool $cacheImage = false ]) : array<string|int, mixed>
Parameters
$documentFront : string

Front of Document (file path, base64 content or URL)

$documentBack : string = ""

Back of Document (file path, base64 content or URL)

$cacheImage : bool = false

Cache uploaded image(s) for 24 hours and obtain a cache reference for each image, the reference hash can be used to start standard scan transaction without re-uploading the file.

Tags
throws
InvalidArgumentException
throws
APIException
throws
Exception
Return values
array<string|int, mixed>

restrictCountry()

Check if the document was issued by specified countries. Separate multiple values with comma. For example "US,CA" would accept documents from the United States and Canada.

public restrictCountry([string $countryCodes = "US,CA,UK" ]) : void
Parameters
$countryCodes : string = "US,CA,UK"

ISO ALPHA-2 Country Code separated by comma

Return values
void

restrictState()

Check if the document was issued by specified state. Separate multiple values with comma. For example "CA,TX" would accept documents from California and Texas.

public restrictState([string $states = "CA,TX" ]) : void
Parameters
$states : string = "CA,TX"

State full name or abbreviation separated by comma

Return values
void

restrictType()

Check if the document was one of the specified types. For example, "PD" would accept both passport and driver license.

public restrictType([string $documentType = "DIP" ]) : void
Parameters
$documentType : string = "DIP"

P: Passport, D: Driver's License, I: Identity Card

Return values
void

scan()

Initiate a new identity document scan & ID face verification transaction by providing input images.

public scan(string $documentFront[, string $documentBack = "" ][, string $facePhoto = "" ][, string $faceVideo = "" ]) : array<string|int, mixed>
Parameters
$documentFront : string

Front of Document (file path, base64 content, url, or cache reference)

$documentBack : string = ""

Back of Document (file path, base64 content or URL, or cache reference)

$facePhoto : string = ""

Face Photo (file path, base64 content or URL, or cache reference)

$faceVideo : string = ""

Face Video (file path, base64 content or URL)

Tags
throws
InvalidArgumentException
throws
APIException
throws
Exception
Return values
array<string|int, mixed>

setContractOptions()

Automatically generate contract document using value parsed from uploaded ID

public setContractOptions(string $templateId[, string $format = "PDF" ][, array<string|int, mixed> $extraFillData = array() ]) : void
Parameters
$templateId : string

Enter up to 5 contract template ID (seperated by comma)

$format : string = "PDF"

PDF, DOCX or HTML

$extraFillData : array<string|int, mixed> = array()

Array data in key-value pairs to autofill dynamic fields, data from user ID will be used first in case of a conflict. For example, passing {"myparameter":"abc"} would fill %{myparameter} in contract template with "abc".

Return values
void

setCustomData()

Set an arbitrary string you wish to save with the transaction. e.g Internal customer reference number

public setCustomData(string $customData) : void
Parameters
$customData : string
Return values
void

setParameter()

Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions

public setParameter(string $parameterKey, string $parameterValue) : void
Parameters
$parameterKey : string

Parameter key

$parameterValue : string

Parameter value

Return values
void

setProfile()

Set KYC Profile

public setProfile(Profile $profile) : void
Parameters
$profile : Profile

KYCProfile object

Tags
throws
InvalidArgumentException
Return values
void

setUserIP()

Pass in user IP address to check if ID is issued from the same country as the IP address, if no value is provided http connection IP will be used.

public setUserIP(string $ip) : void
Parameters
$ip : string
Return values
void

throwAPIException()

Whether an exception should be thrown if API response contains an error message

public throwAPIException([bool $throwException = false ]) : void
Parameters
$throwException : bool = false

Throw exception upon API error, defaults to false

Return values
void

verifyUserInformation()

Check if customer information matches with uploaded document

public verifyUserInformation([string $documentNumber = "X1234567" ][, string $fullName = "ELON MUSK" ][, string $dob = "1990/01/01" ][, string $ageRange = "18-99" ][, string $address = "123 Sample St, California, US" ][, string $postcode = "90001" ]) : void
Parameters
$documentNumber : string = "X1234567"

Document or ID number

$fullName : string = "ELON MUSK"

Full name

$dob : string = "1990/01/01"

Date of birth in YYYY/MM/DD

$ageRange : string = "18-99"

Age range, example: 18-40

$address : string = "123 Sample St, California, US"

Address

$postcode : string = "90001"

Postcode

Return values
void

Search results