Class: KYB

KYB(apiKeyopt)

KYB (Know Your Business) API client. Verifies a business from its registration/incorporation document: extracts the company details, checks official company registries, screens against sanctions/PEP watchlists, and returns directors and owners to verify.

Constructor

new KYB(apiKeyopt)

Create a new KYB API client.
Parameters:
Name Type Attributes Default Description
apiKey string | null <optional>
null Your API key. If omitted, the `IDANALYZER_KEY` environment variable is used.
Source:

Extends

Methods

getApiKey(customKeyopt) → {string|null}

Resolve the API key, preferring the provided value and falling back to the `IDANALYZER_KEY` environment variable.
Parameters:
Name Type Attributes Default Description
customKey string | null <optional>
null Explicitly supplied API key.
Overrides:
Source:
Returns:
The resolved API key, or `null` if none is available.
Type
string | null

setParam(key, value) → {void}

Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions
Parameters:
Name Type Description
key string Parameter key
value * Parameter value
Overrides:
Source:
Returns:
Type
void

throwApiException(swopt) → {void}

Whether an exception should be thrown if API response contains an error message
Parameters:
Name Type Attributes Default Description
sw boolean <optional>
false Set to `true` to throw an APIError when the API response contains an error, or `false` to return the raw error response instead.
Overrides:
Source:
Returns:
Type
void

(async) verify(document, profileopt) → {Promise.<ApiResponse>}

Verify a business from its registration/incorporation document. A document is required; an optional profile selects the KYC profile. The service extracts the company details, checks official company registries, screens against sanctions/PEP watchlists, and returns directors and owners to verify.
Parameters:
Name Type Attributes Default Description
document string Registration/incorporation document (file path, raw base64, URL, or data URL). Required.
profile string <optional>
"" Optional KYC profile to apply.
Source:
Throws:
If `document` is missing or empty.
Type
InvalidArgumentException
Returns:
The parsed API response.
Type
Promise.<ApiResponse>