Configuration
The SDK can be configured extensively via the configuration options passed during initialization.
Managed UI Configuration (SpidifyOptions)
When initializing SpidifySDK, you pass a SpidifyOptions object:
| Option | Type | Required | Description |
|---|---|---|---|
container | string | HTMLElement | Yes | Parent element or CSS selector to mount the Iframe into. |
apiKey | string | Yes | Your Spidify API Key. |
productUrl | string | Yes | The home URL of your Spidify backend installation. |
userId | string | Yes | Unique identifier for your user. |
redirectUrl | string | No | URL to redirect back to after completion. |
webhookUrl | string | No | URL to receive webhook notifications on your server. |
referencePhotoUrl | string | No | Optional reference photo URL for verification (e.g. Liveness). |
branding | object | No | Custom branding overrides (primaryColor, secondaryColor). |
Event Callbacks
You can also pass callback functions directly into the configuration:
onStep(event: SpidifyHandshakeEvent): Callback for each step handshake.onSuccess(data: any): Callback when the process is successfully completed.onFailure(error: string): Callback when an error occurs.
Headless Engine Configuration (KycConfig)
When initializing KycSDK, you pass a KycConfig object:
| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Spidify API Key. |
baseUrl | string | Yes | The URL of your backend orchestration layer. |
externalApiUrl | string | No | Optional override for the external AI API. |
containerId | string | No | Optional ID of the DOM element for rendering. |