---
Source: https://docs.microblink.com/platform-web-sdk/v1.7.x/types
---

[**Microblink Platform SDK**](./index.md)

***

[Microblink Platform SDK](./index.md) / types

# types

## Interfaces {/* #interfaces */}

<a id="consentdata"></a>

### ConsentData {/* #consentdata */}

This interface defines the data which indicates user choices related to storing and
processing of their data gathered in the transaction.

#### Properties {/* #properties */}

<a id="givenon"></a>

##### givenOn {/* #givenon */}

> **givenOn**: `string`

The date and time when the consent was given.

<a id="isprocessingstoringallowed"></a>

##### isProcessingStoringAllowed {/* #isprocessingstoringallowed */}

> **isProcessingStoringAllowed**: `boolean`

Whether user gave consent to store processed data

<a id="istrainingallowed"></a>

##### isTrainingAllowed {/* #istrainingallowed */}

> **isTrainingAllowed**: `boolean`

Whether user gave consent to use it's data in models training

<a id="note"></a>

##### note {/* #note */}

> **note**: `string`

The text of the consent that the user is providing.

<a id="userid"></a>

##### userId {/* #userid */}

> **userId**: `string`

The user ID that will be associated with the consent.

***

<a id="d2dconfig"></a>

### D2DConfig {/* #d2dconfig */}

#### Properties {/* #properties-1 */}

<a id="joinkey"></a>

##### joinKey? {/* #joinkey */}

> `optional` **joinKey**: `string`

<a id="runaddress"></a>

##### runAddress {/* #runaddress */}

> **runAddress**: `string`

***

<a id="documentscanningsettings"></a>

### DocumentScanningSettings {/* #documentscanningsettings */}

#### Properties {/* #properties-2 */}

<a id="ontimeout"></a>

##### onTimeout()? {/* #ontimeout */}

> `optional` **onTimeout**: (`error`) => `void`

Callback function which will be triggered when the scanning process hits the timeout duration.

###### Parameters {/* #parameters */}

| Parameter | Type |
| ------ | ------ |
| `error` | `any` |

###### Returns {/* #returns */}

`void`

<a id="timeout"></a>

##### timeout? {/* #timeout */}

> `optional` **timeout**: `number`

Timeout duration for the scanning process.
If the scanning process takes hits the timeout duration, the scanning will be aborted.
The default value is 60 seconds.

***

<a id="finishresult"></a>

### FinishResult {/* #finishresult */}

#### Properties {/* #properties-3 */}

<a id="status"></a>

##### status {/* #status */}

> **status**: [`VerificationStatus`](api/types.md#verificationstatus-2)

The status of the verification process.

It can be one of the following: 'Unknown', 'Accept', 'Reject', 'Review'.
'Unknown' indicates that the verification process resulted in error.

<a id="transactionid"></a>

##### transactionId {/* #transactionid */}

> **transactionId**: `string`

***

<a id="idvflowprops"></a>

### IdvFlowProps {/* #idvflowprops */}

#### Properties {/* #properties-4 */}

<a id="apiconfig"></a>

##### apiConfig {/* #apiconfig */}

> **apiConfig**: [`ProxyConfig`](#proxyconfig) \| [`TransactionConfig`](#transactionconfig)

Configuration options for communication with Microblink Platform API.

If the mode is set to `classic`, you need to provide the `ProxyConfig` object.
If the mode is set to `d2d`, you need to provide the `TransactionConfig` object.

<a id="consentdata-1"></a>

##### consentData {/* #consentdata-1 */}

> **consentData**: [`ConsentData`](#consentdata)

Data which indicates user choices for storing and processing personal data.

<a id="enabled2d"></a>

##### enableD2D? {/* #enabled2d */}

> `optional` **enableD2D**: `boolean`

Flag which indicates whether the SDK should use device-to-device feature or not. This feature is only used if the mode is set to `classic`.
If the mode is set to `d2d`, this flag will be ignored.

If set to true, the SDK will check the current device camera and if it detects camera is not adequate for scanning,
it will offer a transition to another device. Keep in mind that this feature only works on the desktop devices, D2D
feature is not supported on mobile-to-mobile devices.
If this flag is set to false, feature will be disabled and all flows will be executed on the current device, regardless of
the camera quality.
This flag is set to false by default.

<a id="mode"></a>

##### mode? {/* #mode */}

> `optional` **mode**: [`WorkingMode`](state/types.md#workingmode)

Defines the working mode of the SDK. This is used to determine how the SDK will behave in terms of device-to-device communication.
The working mode can be set to either `classic` or `d2d`. If the mode is set to `classic`, and d2d is enabled, the SDK will act as the primary device in the device-to-device flow.
If the mode is set to `d2d`, the SDK will act as the secondary device in the device-to-device flow.
The default value is `classic`.

<a id="onabort"></a>

##### onAbort()? {/* #onabort */}

> `optional` **onAbort**: () => `void`

Callback function which will be triggered when user has exited the workflow before completion.

###### Returns {/* #returns-1 */}

`void`

<a id="oncardscanresult"></a>

##### onCardScanResult()? {/* #oncardscanresult */}

> `optional` **onCardScanResult**: (`result`) => `void`

Callback function which will be triggered when card scan result is available.
This is used to handle the result of the card scan, which includes details such as card number, expiry date, and other relevant information.

###### Parameters {/* #parameters-1 */}

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `result` | `CardScanResult` | contains the result of the card scan. |

###### Returns {/* #returns-2 */}

`void`

<a id="onerror"></a>

##### onError()? {/* #onerror */}

> `optional` **onError**: (`errorData?`) => `void`

Global error callback function which will be triggered on various error conditions.

NOTE: Currently used only for scanning timeout error, but can be extended for other error states in the future.

###### Parameters {/* #parameters-2 */}

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `errorData?` | \{ `capability?`: `string`; `errorType?`: [`ERROR_SCAN_TIMEOUT`](api/types.md#error_scan_timeout); `transactionId?`: `string`; \} | Contains useful information about the error: - capability: The capability on which the error occurred (e.g., 'DocVer', 'BlinkId') - transactionId: The transaction ID associated with the error - errorType: The type of error that occurred (e.g., 'ERROR_SCAN_TIMEOUT') which you can use to handle different scenarios |
| `errorData.capability?` | `string` | - |
| `errorData.errorType?` | [`ERROR_SCAN_TIMEOUT`](api/types.md#error_scan_timeout) | - |
| `errorData.transactionId?` | `string` | - |

###### Returns {/* #returns-3 */}

`void`

<a id="onexit"></a>

##### ~~onExit()?~~ {/* #onexit */}

> `optional` **onExit**: (`status`) => `void`

###### Parameters {/* #parameters-3 */}

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `status` | `"completed"` \| `"aborted"` | signals whether the workflow has been completed or aborted. |

###### Returns {/* #returns-4 */}

`void`

###### Deprecated {/* #deprecated */}

This callback is deprecated and will be removed in future versions.
Use `onTransactionFinished` and `onAbort` callbacks instead for handling workflow completion and abortion.

Callback function which will be triggered in two situations:
1. Workflow has been completed
2. User has exited the workflow before completion.

<a id="ontransactionfinished"></a>

##### onTransactionFinished()? {/* #ontransactionfinished */}

> `optional` **onTransactionFinished**: (`result`) => `void`

Callback function which will be triggered when transaction is finished.

###### Parameters {/* #parameters-4 */}

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `result` | [`FinishResult`](#finishresult) | contains the status of the transaction and the transaction ID. The status can be one of the following: 'Unknown', 'Accept', 'Reject', 'Review' |

###### Returns {/* #returns-5 */}

`void`

<a id="resourcespath"></a>

##### resourcesPath? {/* #resourcespath */}

> `optional` **resourcesPath**: `string`

Path to the resources folder which contains the wasm resources.

<a id="scantimeout"></a>

##### scanTimeout? {/* #scantimeout */}

> `optional` **scanTimeout**: `number`

Timeout duration in milliseconds for document scanning (DocVer and BlinkId capabilities).

For classic mode:
 - Works only when used in combination with `onError` prop.
 - onError callback will be triggered when user clicks on "Try another way" button when timeout error screen appears

For D2D hosted app:
 - it is enough to pass scanTimeout prop for triggering the timeout error.
 - When clicked on "Switch to desktop to continue" button on timeout error screen, user is switched to the primary device 
 and onError callback from the primary hosted app will be triggered if provided.
 - onError prop provided to the D2D hosted app for timeout error is ignored.

<a id="themeoverride"></a>

##### themeOverride? {/* #themeoverride */}

> `optional` **themeOverride**: [`ThemeOverride`](#themeoverride-1)

Defines options for customization and theming of a user interface.

<a id="translationsoverride"></a>

##### translationsOverride? {/* #translationsoverride */}

> `optional` **translationsOverride**: [`TranslationMessages`](react.md#translationmessages)

Options to override the default language.
If not provided, the default language will be English.
If you want to use SDK in another language, this object exposes all of the strings that can be translated.

***

<a id="proxyconfig"></a>

### ProxyConfig {/* #proxyconfig */}

This interface defines the configuration for the proxy server that will be used to communicate with the identity verification service.
The goal of a proxy server is to provide additional layer of security when starting the transaction on the IDV service.

#### Properties {/* #properties-5 */}

<a id="d2d"></a>

##### d2d? {/* #d2d */}

> `optional` **d2d**: [`D2DConfig`](#d2dconfig)

Configuration options for device-to-device.

<a id="formvalues"></a>

##### formValues? {/* #formvalues */}

> `optional` **formValues**: `Record`\<`string`, `string`\>

Custom fields that will be sent to the proxy server when starting the transaction which will be used in the defined workflow.

<a id="headers"></a>

##### headers? {/* #headers */}

> `optional` **headers**: `ApiHeaders`

The headers that will be sent to the proxy server when starting the transaction.

<a id="url"></a>

##### url {/* #url */}

> **url**: `string`

The URL of the proxy server.

<a id="workflowid"></a>

##### workflowId {/* #workflowid */}

> **workflowId**: `string`

The ID of the workflow to be executed. Workflow defines which steps will be executed.

***

<a id="themeoverride-1"></a>

### ThemeOverride {/* #themeoverride-1 */}

This interface provides properties that can be used to define custom styles, colors, and icons for specific parts of the UI.

#### Properties {/* #properties-6 */}

<a id="accent"></a>

##### accent? {/* #accent */}

> `optional` **accent**: `object`

A color palette that defines accent colors used throughout the UI. The palette follows a step system from 25 to 900 to allow for a range of shades.

| Name | Type |
| ------ | ------ |
| `100` | `string` |
| `200` | `string` |
| `25` | `string` |
| `300` | `string` |
| `400` | `string` |
| `50` | `string` |
| `500` | `string` |
| `600` | `string` |
| `700` | `string` |
| `800` | `string` |
| `900` | `string` |

<a id="buttonborderradius"></a>

##### buttonBorderRadius? {/* #buttonborderradius */}

> `optional` **buttonBorderRadius**: `string` \| `number`

Specifies the border radius of buttons throughout the UI.

This can be defined using CSS units (like px, em, or %) as a string or a plain number (which will be treated as pixels by default).

<a id="fontfamily"></a>

##### fontFamily? {/* #fontfamily */}

> `optional` **fontFamily**: `string`

Specifies the font family to be used throughout the UI. Font family name needs to be a valid CSS font-family value
hosted inside parent web application.

<a id="resultsscreen"></a>

##### resultsScreen? {/* #resultsscreen */}

> `optional` **resultsScreen**: `object`

Defines icons used on the results screen to visually indicate different states of identity verification.

| Name | Type | Description |
| ------ | ------ | ------ |
| `identityNotVerifiedIcon?` | `string` | Specifies the path to the icon used to represent an unverified identity. |
| `identityVerifiedIcon?` | `string` | Specifies the path to the icon used to represent a verified identity. |
| `identityVerifyingIcon?` | `string` | Specifies the path to the icon used to indicate that identity verification is in progress. |

<a id="startscreenicon"></a>

##### startScreenIcon? {/* #startscreenicon */}

> `optional` **startScreenIcon**: `string`

Specifies the path of the icon to be displayed on the start screen. This allows for branding or a custom visual indicator on the initial screen.

***

<a id="transactionconfig"></a>

### TransactionConfig {/* #transactionconfig */}

Defines options to use SDK with existing transaction ID.
This enables the SDK to be used in a scenario where the transaction has already been started by someone else,
and SDK wants to either resume or start flow with that transaction ID.
Useful scenarios include device-to-device flow, verifications links or other scenarios where transaction ID is shared.

#### Properties {/* #properties-7 */}

<a id="apiurl"></a>

##### apiUrl {/* #apiurl */}

> **apiUrl**: `string`

Url which will be used to communicate with the Microblink Platform API.

<a id="d2d-1"></a>

##### d2d? {/* #d2d-1 */}

> `optional` **d2d**: [`D2DConfig`](#d2dconfig)

Configuration options for device-to-device.

<a id="ephemeralkey"></a>

##### ephemeralKey {/* #ephemeralkey */}

> **ephemeralKey**: `string`

Key for communication with API.

<a id="transactionid-1"></a>

##### transactionId {/* #transactionid-1 */}

> **transactionId**: `string`

The transaction ID that will be used in IDV flow.


Last updated on Apr 16, 2026
