widgetId | string | Yes | Widget ID from the dashboard. Must match the widget’s environment (see Environments). |
publicKey | string | Yes | Publishable key: test_pk_… for sandbox, live_pk_… for live. |
environment | "sandbox" | "live" | Yes | Must match the key prefix and widget: "sandbox" with test_pk_…, "live" with live_pk_…. |
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. Default "en". |
presentationStyle | "fullScreen" | "modal" | No | Presentation hint passed to the widget. |
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. |