Skip to main content

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:

OptionTypeRequiredDescription
containerstring | HTMLElementYesParent element or CSS selector to mount the Iframe into.
apiKeystringYesYour Spidify API Key.
productUrlstringYesThe home URL of your Spidify backend installation.
userIdstringYesUnique identifier for your user.
redirectUrlstringNoURL to redirect back to after completion.
webhookUrlstringNoURL to receive webhook notifications on your server.
referencePhotoUrlstringNoOptional reference photo URL for verification (e.g. Liveness).
brandingobjectNoCustom 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:

OptionTypeRequiredDescription
apiKeystringYesYour Spidify API Key.
baseUrlstringYesThe URL of your backend orchestration layer.
externalApiUrlstringNoOptional override for the external AI API.
containerIdstringNoOptional ID of the DOM element for rendering.