Constructor
new Profile(profileId)
Initialize KYC Profile
Parameters:
| Name | Type | Description |
|---|---|---|
profileId |
string | Custom profile ID or preset profile (security_none, security_low, security_medium, security_high). SECURITY_NONE will be used if left blank. |
- Source:
Members
SECURITY_HIGH
Preset profile applying high-strictness validation. @type {string}
- Source:
SECURITY_LOW
Preset profile applying low-strictness validation. @type {string}
- Source:
SECURITY_MEDIUM
Preset profile applying medium-strictness validation. @type {string}
- Source:
SECURITY_NONE
Preset profile applying no validation. @type {string}
- Source:
Methods
AAMVABarcodeParsing(enabled) → {void}
Enable to parse AAMVA barcode for US/CA ID/DL. Disable this to improve performance if you are not planning on scanning ID/DL from US or Canada.
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean | Whether to enable AAMVA barcode parsing. |
- Source:
Returns:
- Type
- void
autoCrop(enableAutoCrop, enableAdvancedAutoCrop) → {void}
Crop image before saving and returning output
Parameters:
| Name | Type | Description |
|---|---|---|
enableAutoCrop |
boolean | Whether to automatically crop the document from the image. |
enableAdvancedAutoCrop |
boolean | Whether to enable advanced (perspective-corrected) auto cropping. |
- Source:
Returns:
- Type
- void
canvasSize(pixels) → {void}
Canvas Size in pixels, input image larger than this size will be scaled down before further processing, reduced image size will improve inference time but reduce result accuracy. Set 0 to disable image resizing.
Parameters:
| Name | Type | Description |
|---|---|---|
pixels |
number | Maximum canvas dimension in pixels. Set 0 to disable resizing. |
- Source:
Returns:
- Type
- void
decisionTrigger(reviewTriggeropt, rejectTriggeropt) → {void}
Set decision trigger value
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
reviewTrigger |
number |
<optional> |
1 | If the final total review score is equal to or greater than this value, the final KYC decision will be "review". |
rejectTrigger |
number |
<optional> |
1 | If the final total review score is equal to or greater than this value, the final KYC decision will be "reject". Reject has higher priority than review. |
- Source:
Returns:
- Type
- void
inferFullName(enabled) → {void}
Generate a full name field using parsed first name, middle name and last name.
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean | Whether to infer the full name field. |
- Source:
Returns:
- Type
- void
loadFromJson(jsonStropt) → {void}
Set profile configuration with provided JSON string
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
jsonStr |
string |
<optional> |
'{}' | JSON string containing profile information. |
- Source:
Returns:
- Type
- void
objectDetection(enabled) → {void}
Enable to automatically detect and return the locations of signature, document and face.
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean | Whether to enable object detection. |
- Source:
Returns:
- Type
- void
obscure(fieldKeys) → {void}
A list of data fields key to be redacted before transaction storage, these fields will also be blurred from output & saved image.
Parameters:
| Name | Type | Description |
|---|---|---|
fieldKeys |
Array.<string> | Array of data field keys to redact and blur. |
- Source:
Returns:
- Type
- void
orientationCorrection(enabled) → {void}
Correct image orientation for rotated images
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean | Whether to enable automatic orientation correction. |
- Source:
Returns:
- Type
- void
outputImage(enableOutputImage, outputFormatopt) → {void}
Whether to return output image as part of API response
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
enableOutputImage |
boolean | Whether to return the output image in the API response. | ||
outputFormat |
string |
<optional> |
"url" | Output image format, either "url" or "base64". |
- Source:
Returns:
- Type
- void
outputSize(pixels) → {void}
Maximum width/height in pixels for output and saved image.
Parameters:
| Name | Type | Description |
|---|---|---|
pixels |
number | Maximum width/height in pixels for the output and saved image. |
- Source:
Returns:
- Type
- void
restrictDocumentCountry(countryCodesopt) → {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.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
countryCodes |
string |
<optional> |
"US,CA,UK" | ISO ALPHA-2 Country Code separated by comma |
- Source:
Returns:
- Type
- void
restrictDocumentState(statesopt) → {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.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
states |
string |
<optional> |
"CA,TX" | State full name or abbreviation separated by comma |
- Source:
Returns:
- Type
- void
restrictDocumentType(documentTypeopt) → {void}
Check if the document was one of the specified types. For example, "PD" would accept both passport and driver license.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
documentType |
string |
<optional> |
"DIP" | P: Passport, D: Driver's License, I: Identity Card |
- Source:
Returns:
- Type
- void
saveResult(enableSaveTransaction, enableSaveTransactionImages) → {void}
Whether scan transaction results and output images should be saved on cloud
Parameters:
| Name | Type | Description |
|---|---|---|
enableSaveTransaction |
boolean | Whether the scan transaction result should be saved on the cloud. |
enableSaveTransactionImages |
boolean | Whether the output images should also be saved on the cloud. |
- Source:
Returns:
- Type
- void
setTimezone(timezone) → {void}
Set timezone for audit reports. If left blank, UTC will be used. Refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones TZ database name list.
Parameters:
| Name | Type | Description |
|---|---|---|
timezone |
string | TZ database name (e.g. "America/New_York"). UTC is used if left blank. |
- Source:
Returns:
- Type
- void
setWarning(codeopt, enabledopt, reviewThresholdopt, rejectThresholdopt, weightopt) → {void}
Enable/Disable and fine-tune how each Document Validation Component affects the final decision.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
code |
string |
<optional> |
"UNRECOGNIZED_DOCUMENT" | Document Validation Component Code / Warning Code |
enabled |
boolean |
<optional> |
true | Enable the current Document Validation Component |
reviewThreshold |
number |
<optional> |
-1 | If the current validation has failed to pass, and the specified number is greater than or equal to zero, and the confidence of this warning is greater than or equal to the specified value, the "total review score" will be added by the weight value. |
rejectThreshold |
number |
<optional> |
0 | If the current validation has failed to pass, and the specified number is greater than or equal to zero, and the confidence of this warning is greater than or equal to the specified value, the "total reject score" will be added by the weight value. |
weight |
number |
<optional> |
1 | Weight to add to the total review and reject score if the validation has failed to pass. |
- Source:
Returns:
- Type
- void
splitFirstName(enabled) → {void}
If first name contains more than one word, move second word onwards into middle name field.
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean | Whether to split a multi-word first name into first and middle name. |
- Source:
Returns:
- Type
- void
threshold(thresholdKey, thresholdValue) → {void}
Set validation threshold of a specified component
Parameters:
| Name | Type | Description |
|---|---|---|
thresholdKey |
string | Threshold component key. |
thresholdValue |
number | Threshold value for the specified component. |
- Source:
Returns:
- Type
- void
transactionAuditReport(enabled) → {void}
Enable to generate a detailed PDF audit report for every transaction.
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean | Whether to generate a PDF audit report for every transaction. |
- Source:
Returns:
- Type
- void
webhook(urlopt) → {void}
Enter a server URL to listen for Docupass verification and scan transaction results
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
url |
string |
<optional> |
"https://www.example.com/webhook.php" | Remote webhook URL. Must be a valid http/https URL pointing at a non-localhost host. |
- Source:
Throws:
-
If the URL is malformed, points to localhost, or uses a non-http(s) protocol.
Returns:
- Type
- void