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

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

***

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

# types

## Interfaces

### ConsentData

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

#### Properties

##### givenOn?

> `optional` **givenOn**: `Date`

The date and time when the consent was given.

##### isProcessingStoringAllowed?

> `optional` **isProcessingStoringAllowed**: `boolean`

Whether user gave consent to store processed data

##### isTrainingAllowed?

> `optional` **isTrainingAllowed**: `boolean`

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

##### note?

> `optional` **note**: `string`

The text of the consent that the user is providing.

##### userId

> **userId**: `string`

The user ID that will be associated with the consent.

***

### D2DConfig

#### Properties

##### joinKey?

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

##### runAddress

> **runAddress**: `string`

***

### FinishResult

#### Properties

##### status

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

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.

##### transactionId

> **transactionId**: `string`

***

### IdvFlowProps

#### Properties

##### 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.

##### consentData

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

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

##### 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.

##### endResultScreen()?

> `optional` **endResultScreen**: (`args`) => `string` \| `Element` \| `HTMLElement`

This allows you to override the default end result screen UI after the IDV flow completes.

For React apps: Return a React component or JSX

For Vanilla JS apps: Return an HTMLElement (recommended) or HTML string

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `args` | [`EndScreenState`](components/types.md#endscreenstate) & [`EndScreenActions`](components/types.md#endscreenactions) | Object containing the current state and actions for the end result screen |

###### Returns

`string` \| `Element` \| `HTMLElement`

React component (React apps) or HTMLElement/string (Vanilla JS apps)

##### 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`.

##### onAbort()?

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

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

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `data` | [`OnAbortParams`](#onabortparams) |

###### Returns

`void`

##### 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

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

###### Returns

`void`

##### 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

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `errorData?` | \{ `capability?`: `string`; `errorType?`: [`ERROR_SCAN_TIMEOUT`](api/types.md) \| [`TransactionCancelReason`](api/types.md#transactioncancelreason); `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) \| [`TransactionCancelReason`](api/types.md#transactioncancelreason) | - |
| `errorData.transactionId?` | `string` | - |

###### Returns

`void`

##### ~~onExit()?~~

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

###### Parameters

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

###### Returns

`void`

###### 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.

##### onTransactionFinished()?

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

Callback function which will be triggered when transaction is finished.

###### Parameters

| 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

`void`

##### progressScreen()?

> `optional` **progressScreen**: (`args`) => `string` \| `Element` \| `HTMLElement`

This allows you to override the default progress screen UI while the IDV flow is in between capabilities execution.

IMPORTANT: When using this prop, make sure to expose some button or mechanism for users to trigger the `continueFlow` action,
which allows them to proceed to the next step in the verification process.
Otherwise user will not be able to proceed with the verification process.
Also, avoid calling `continueFlow` immediately within the `progressScreen` callback to prevent unintended side effects such as inability for user to exit step execution.

For React apps: Return a React component or JSX

For Vanilla JS apps: Return an HTMLElement (recommended) or HTML string

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `args` | [`ProgressScreenState`](components/types.md#progressscreenstate) & [`ProgressScreenActions`](components/types.md#progressscreenactions) | Object containing the current state and actions for the progress screen |

###### Returns

`string` \| `Element` \| `HTMLElement`

React component (React apps) or HTMLElement/string (Vanilla JS apps)

##### resourcesPath?

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

Path to the resources folder which contains the wasm resources.

##### 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.

##### startScreen()?

> `optional` **startScreen**: (`args`) => `string` \| `Element` \| `HTMLElement`

This allows you to override the default initial screen UI before the IDV flow begins.

For React apps: Return a React component or JSX

For Vanilla JS apps: Return an HTMLElement (recommended) or HTML string

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `args` | [`StartScreenState`](components/types.md#startscreenstate) & [`StartScreenActions`](components/types.md#startscreenactions) | Object containing the current state and actions for the start screen |

###### Returns

`string` \| `Element` \| `HTMLElement`

React component (React apps) or HTMLElement/string (Vanilla JS apps)

##### themeOverride?

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

Defines options for customization and theming of a user interface.

##### 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.

***

### 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

##### d2d?

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

Configuration options for device-to-device.

##### 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.

##### headers?

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

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

##### proxy

> **proxy**: [`Proxy`](#proxy-1)

Configuration for the proxy server endpoints.

##### workflowId

> **workflowId**: `string`

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

***

### ThemeOverride

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

#### Properties

##### 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` |

##### 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).

##### 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.

##### 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. |

##### 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.

***

### 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

##### apiUrl

> **apiUrl**: `string`

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

##### d2d?

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

Configuration options for device-to-device.

##### ephemeralKey

> **ephemeralKey**: `string`

Key for communication with API.

##### transactionId

> **transactionId**: `string`

The transaction ID that will be used in IDV flow.

## Type Aliases

### OnAbortParams

> **OnAbortParams** = `object`

Parameters exposed when onAbort callback is triggered.
Exposes aborted transactionId and capability on which it occured.

#### Properties

##### capability?

> `optional` **capability**: `string`

##### message?

> `optional` **message**: `string`

##### transactionId?

> `optional` **transactionId**: `string`

***

### Proxy

> **Proxy** = `object`

Defines the configuration for proxy server endpoints used to communicate with the identity verification service.
Allows customization of API paths while maintaining default values.

#### Properties

##### baseUrl

> **baseUrl**: `string`

The base URL of the proxy server.

##### cancelWorkflowPath?

> `optional` **cancelWorkflowPath**: `"/initialize/{workflowId}/cancel"` \| `ApiPathWithWorkflowId` & `object`

Custom path for canceling a workflow. Must include `{workflowId}` placeholder.
Defaults to '/initialize/`{workflowId}`/cancel' if not specified.

##### startTransactionPath?

> `optional` **startTransactionPath**: `"/transaction"` \| `string` & `object`

Custom path for starting a transaction. Defaults to '/transaction' if not specified.

##### workflowInfoPath?

> `optional` **workflowInfoPath**: `"/initialize/{workflowId}/info"` \| `ApiPathWithWorkflowId` & `object`

Custom path for retrieving workflow information. Must include `{workflowId}` placeholder.
Defaults to '/initialize/`{workflowId}`/info' if not specified.


Last updated on May 21, 2026
