widgetId | string | Yes | Widget ID from the dashboard. Must match the widget’s environment. |
publicKey | string | Yes | Publishable key: test_pk_… (sandbox) or live_pk_… (live). |
environment | "sandbox" | "live" | Yes | "sandbox" with test_pk_…, "live" with live_pk_…. See Environments. |
applicant | ApplicantInput | No | Pre-fill applicant fields. |
referenceId | string | No | Your internal reference ID. |
sessionToken | string | No | Signed server token for secure mode. |
locale | string | No | Language code. Default "en". |
trigger | ReactNode | No | Custom trigger element. Defaults to a styled button. |
autoOpen | boolean | No | Open immediately on mount. Default false. |
onSuccess | (applicant: ApplicantResult) => void | No | Fires on approval. |
onAbandon | () => void | No | Fires when user closes early. |
onError | (error: WidgetError) => void | No | Fires on unrecoverable error. |
onStepCompleted | (step: StepResult) => void | No | Fires after each module. |
onReady | () => void | No | Fires when widget script is loaded. |