idanalyzer
Version:
ID Analyzer API client library, scan and verify global passport, driver license and identification card.
4,505 lines (1,058 loc) • 78.8 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: DocuPass</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: DocuPass</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>DocuPass<span class="signature">(apikey, companyName, region)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="DocuPass"><span class="type-signature"></span>new DocuPass<span class="signature">(apikey, companyName, region)</span><span class="type-signature"></span></h4>
<div class="description">
Initialize DocuPass API with an API key, company name and optional region (US, EU)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>apikey</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
</td>
<td class="description last">You API key</td>
</tr>
<tr>
<td class="name"><code>companyName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
My Company Name
</td>
<td class="description last">Your company name</td>
</tr>
<tr>
<td class="name"><code>region</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
US
</td>
<td class="description last">US/EU</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line579">line 579</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="createIframe"><span class="type-signature"></span>createIframe<span class="signature">()</span><span class="type-signature"> → {Promise.<object>}</span></h4>
<div class="description">
Create a DocuPass session for embedding in web page as iframe
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1139">line 1139</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<object></span>
</dd>
</dl>
<h4 class="name" id="createLiveMobile"><span class="type-signature"></span>createLiveMobile<span class="signature">()</span><span class="type-signature"> → {Promise.<object>}</span></h4>
<div class="description">
Create a DocuPass Live Mobile verification session for users to open on mobile phone
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1166">line 1166</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<object></span>
</dd>
</dl>
<h4 class="name" id="createMobile"><span class="type-signature"></span>createMobile<span class="signature">()</span><span class="type-signature"> → {Promise.<object>}</span></h4>
<div class="description">
Create a DocuPass session for users to open on mobile phone, or embedding in mobile app
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1148">line 1148</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<object></span>
</dd>
</dl>
<h4 class="name" id="createRedirection"><span class="type-signature"></span>createRedirection<span class="signature">()</span><span class="type-signature"> → {Promise.<object>}</span></h4>
<div class="description">
Create a DocuPass session for users to open in any browser
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1157">line 1157</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<object></span>
</dd>
</dl>
<h4 class="name" id="createSignature"><span class="type-signature"></span>createSignature<span class="signature">(templateId, format, prefillData)</span><span class="type-signature"> → {Promise.<object>}</span></h4>
<div class="description">
Create a DocuPass signature session for user to review and sign legal document without identity verification
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>templateId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
</td>
<td class="description last">Contract Template ID displayed under web portal</td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
PDF
</td>
<td class="description last">Output file format: PDF, DOCX or HTML</td>
</tr>
<tr>
<td class="name"><code>prefillData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="default">
</td>
<td class="description last">Object or JSON string, to autofill dynamic fields in contract template.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1108">line 1108</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<object></span>
</dd>
</dl>
<h4 class="name" id="enableAMLCheck"><span class="type-signature"></span>enableAMLCheck<span class="signature">(enabled)</span><span class="type-signature"></span></h4>
<div class="description">
Check document holder's name and document number against ID Analyzer AML Database for sanctions, crimes and PEPs.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">Enable or disable AML/PEP check</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line609">line 609</a>
</li></ul></dd>
</dl>
<h4 class="name" id="enableAMLStrictMatch"><span class="type-signature"></span>enableAMLStrictMatch<span class="signature">(enabled)</span><span class="type-signature"></span></h4>
<div class="description">
By default, entities with identical name or document number will be considered a match even though their birthday or nationality may be unknown. Enable this parameter to reduce false-positives by only matching entities with exact same nationality and birthday.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">Enable or disable AML strict match mode</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line627">line 627</a>
</li></ul></dd>
</dl>
<h4 class="name" id="enableAuthentication"><span class="type-signature"></span>enableAuthentication<span class="signature">(enabled, module, minimum_score)</span><span class="type-signature"></span></h4>
<div class="description">
Validate the document to check whether the document is authentic and has not been tampered
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">Enable or disable Document Authentication</td>
</tr>
<tr>
<td class="name"><code>module</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="default">
2
</td>
<td class="description last">Authentication Module: "1", "2" or "quick"</td>
</tr>
<tr>
<td class="name"><code>minimum_score</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
0.3
</td>
<td class="description last">Minimum score to pass verification</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line786">line 786</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h4 class="name" id="enableDualsideCheck"><span class="type-signature"></span>enableDualsideCheck<span class="signature">(enabled)</span><span class="type-signature"></span></h4>
<div class="description">
Check if the names, document number and document type matches between the front and the back of the document when performing dual-side scan. If any information mismatches error 14 will be thrown.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">Enable or disable dual-side information check</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line889">line 889</a>
</li></ul></dd>
</dl>
<h4 class="name" id="enableFaceVerification"><span class="type-signature"></span>enableFaceVerification<span class="signature">(enabled, verification_type, threshold)</span><span class="type-signature"></span></h4>
<div class="description">
Whether users will be required to submit a selfie photo or record selfie video for facial verification.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">Enable or disable Facial Biometric Verification</td>
</tr>
<tr>
<td class="name"><code>verification_type</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
1
</td>
<td class="description last">1 for photo verification, 2 for video verification</td>
</tr>
<tr>
<td class="name"><code>threshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
0.4
</td>
<td class="description last">Minimum confidence score required to pass verification, value between 0 to 1</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line811">line 811</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h4 class="name" id="enablePhoneVerification"><span class="type-signature"></span>enablePhoneVerification<span class="signature">(enabled)</span><span class="type-signature"></span></h4>
<div class="description">
Whether to ask user to enter a phone number for verification, DocuPass supports both mobile or landline number verification. Verified phone number will be returned in callback JSON.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">Enable or disable user phone verification</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line637">line 637</a>
</li></ul></dd>
</dl>
<h4 class="name" id="enableVault"><span class="type-signature"></span>enableVault<span class="signature">(enabled)</span><span class="type-signature"></span></h4>
<div class="description">
Save document image and parsed information in your secured vault. You can list, search and update document entries in your vault through Vault API or web portal.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
true
</td>
<td class="description last">Enable or disable Vault</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1048">line 1048</a>
</li></ul></dd>
</dl>
<h4 class="name" id="generateContract"><span class="type-signature"></span>generateContract<span class="signature">(templateId, format, prefillData)</span><span class="type-signature"></span></h4>
<div class="description">
Generate legal document using data from user uploaded ID
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>templateId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
</td>
<td class="description last">Contract Template ID displayed under web portal</td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
PDF
</td>
<td class="description last">Output file format: PDF, DOCX or HTML</td>
</tr>
<tr>
<td class="name"><code>prefillData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="default">
</td>
<td class="description last">Object or JSON string, to autofill dynamic fields in contract template.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1071">line 1071</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h4 class="name" id="hideBrandingLogo"><span class="type-signature"></span>hideBrandingLogo<span class="signature">(hide)</span><span class="type-signature"></span></h4>
<div class="description">
Hide all branding logo
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hide</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line718">line 718</a>
</li></ul></dd>
</dl>
<h4 class="name" id="resetConfig"><span class="type-signature"></span>resetConfig<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Reset all API configurations except API key and region.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line600">line 600</a>
</li></ul></dd>
</dl>
<h4 class="name" id="restrictCountry"><span class="type-signature"></span>restrictCountry<span class="signature">(countryCodes)</span><span class="type-signature"></span></h4>
<div class="description">
Check if the document was issued by specified countries, if not error code 10 will be thrown. Separate multiple values with comma. For example "US,CA" would accept documents from United States and Canada.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>countryCodes</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
US,CA,UK
</td>
<td class="description last">ISO ALPHA-2 Country Code separated by comma</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1006">line 1006</a>
</li></ul></dd>
</dl>
<h4 class="name" id="restrictState"><span class="type-signature"></span>restrictState<span class="signature">(states)</span><span class="type-signature"></span></h4>
<div class="description">
Check if the document was issued by specified state, if not error code 11 will be thrown. Separate multiple values with comma. For example "CA,TX" would accept documents from California and Texas.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>states</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
CA,TX
</td>
<td class="description last">State full name or abbreviation separated by comma</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1020">line 1020</a>
</li></ul></dd>
</dl>
<h4 class="name" id="restrictType"><span class="type-signature"></span>restrictType<span class="signature">(documentType)</span><span class="type-signature"></span></h4>
<div class="description">
Only accept document of specified types. For example, "PD" would accept both passport and drivers license.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>documentType</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
DIP
</td>
<td class="description last">P: Passport, D: Driver's License, I: Identity Card</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1034">line 1034</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setAMLDatabase"><span class="type-signature"></span>setAMLDatabase<span class="signature">(databases)</span><span class="type-signature"></span></h4>
<div class="description">
Specify the source databases to perform AML check, if left blank, all source databases will be checked. Separate each database code with comma, for example: un_sc,us_ofac. For full list of source databases and corresponding code visit AML API Overview.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>databases</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
au_dfat,ca_dfatd,ch_seco,eu_fsf,fr_tresor_gels_avoir,gb_hmt,ua_sfms,un_sc,us_ofac,eu_cor,eu_meps,global_politicians,interpol_red
</td>
<td class="description last">Database codes separated by comma</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line618">line 618</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setCallbackImage"><span class="type-signature"></span>setCallbackImage<span class="signature">(return_documentimage, return_faceimage, return_type)</span><span class="type-signature"></span></h4>
<div class="description">
Enable or disable returning user uploaded document and face image in callback, and image data format.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>return_documentimage</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
true
</td>
<td class="description last">Return document image in callback data</td>
</tr>
<tr>
<td class="name"><code>return_faceimage</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
true
</td>
<td class="description last">Return face image in callback data</td>
</tr>
<tr>
<td class="name"><code>return_type</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
1
</td>
<td class="description last">Image type: 0=base64, 1=url</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line844">line 844</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setCallbackURL"><span class="type-signature"></span>setCallbackURL<span class="signature">(url)</span><span class="type-signature"></span></h4>
<div class="description">
Set server-side callback/webhook URL to receive verification results
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
https://www.example.com/docupass_callback.php
</td>
<td class="description last">Callback URL</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line749">line 749</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h4 class="name" id="setCustomHTML"><span class="type-signature"></span>setCustomHTML<span class="signature">(url)</span><span class="type-signature"></span></h4>
<div class="description">
Replace DocuPass page content with your own HTML and CSS, you can download the HTML/CSS template from DocuPass API Reference page
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">URL pointing to your own HTML page</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line727">line 727</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setCustomID"><span class="type-signature"></span>setCustomID<span class="signature">(customID)</span><span class="type-signature"></span></h4>
<div class="description">
Set a custom string that will be sent back to your server's callback URL, and appended to redirection URLs as a query string. It is useful for identifying your user within your database. This value will be stored under docupass_customdata under Vault.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>customID</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
12345
</td>
<td class="description last">A string used to identify your customer internally</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line689">line 689</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setLanguage"><span class="type-signature"></span>setLanguage<span class="signature">(language)</span><span class="type-signature"></span></h4>
<div class="description">
DocuPass automatically detects user device language and display corresponding language. Set this parameter to override automatic language detection.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>language</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Check DocuPass API reference for language code</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line737">line 737</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setLogo"><span class="type-signature"></span>setLogo<span class="signature">(url)</span><span class="type-signature"></span></h4>
<div class="description">
Replace footer logo with your own logo
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
https://docupass.app/asset/logo1.png
</td>
<td class="description last">Logo URL</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line708">line 708</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setMaxAttempt"><span class="type-signature"></span>setMaxAttempt<span class="signature">(max_attempt)</span><span class="type-signature"></span></h4>
<div class="description">
Set max verification attempt per user
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>max_attempt</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
1
</td>
<td class="description last">1 to 10</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line676">line 676</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h4 class="name" id="setParameter"><span class="type-signature"></span>setParameter<span class="signature">(parameterKey, parameterValue)</span><span class="type-signature"></span></h4>
<div class="description">
Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parameterKey</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Parameter key</td>
</tr>
<tr>
<td class="name"><code>parameterValue</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Parameter value</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="idanalyzer.js.html">idanalyzer.js</a>, <a href="idanalyzer.js.html#line1059">line 1059</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
void
</div>
<h4 class="name" id="setQRCodeFormat"><span class="type-signature"></span>setQRCodeFormat<span class="signature">(foregroundColor, backgroundColor, size, margin)</span><span class="type-signature"></span></h4>
<div class="description">
Configure QR code generated for DocuPass Mobile and Live Mobile
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>foregroundColor</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
000000