Skip to main content

Method Signature

FAD_SDK.startFadWeb4(ticket: string): Promise<FadWeb4Response>
Initiates the Fad Web 4 workflow, a ticket-based orchestration system that manages multi-step biometric verification processes.

Parameters

ticket
string
required
The ticket identifier that defines the workflow configuration and steps to execute. This ticket is typically generated by your backend system and contains the workflow definition.

Return Value

Returns a Promise that resolves to a FadWeb4Response object containing the workflow results.
data
object
The workflow execution results
event
string
Event type indicating workflow completion or user cancellation
  • FadSDK.Constants.EventModule.PROCESS_COMPLETED - Workflow completed successfully
  • FadSDK.Constants.EventModule.MODULE_CLOSED - User closed the workflow

Usage Example

import FadSDK from '@fad-producto/fad-sdk';

async function runWorkflow() {
  const options = {
    environment: FadSDK.getFadEnvironments().UATHA
  };

  const FAD_SDK = new FadSDK(null, options);
  
  try {
    // Ticket obtained from your backend system
    const ticket = 'workflow-ticket-abc123';
    
    const result = await FAD_SDK.startFadWeb4(ticket);
    
    if (result.event === FadSDK.Constants.EventModule.MODULE_CLOSED) {
      console.log('User cancelled the workflow');
      return;
    }
    
    // Process workflow results
    console.log('Workflow completed:', result.data);
    
  } catch (error) {
    console.error('Workflow error:', error);
  } finally {
    FAD_SDK.end();
  }
}

How It Works

The Fad Web 4 module provides a ticket-based workflow orchestration system:
  1. Ticket Generation: Your backend generates a workflow ticket that defines the steps to execute
  2. Workflow Execution: The SDK executes each step in the workflow based on the ticket configuration
  3. Step Coordination: Multiple biometric modules can be chained together (e.g., document capture → liveness detection)
  4. Result Aggregation: Results from all steps are collected and returned in a unified response

Use Cases

Complete KYC Workflows

Chain document capture, liveness detection, and verification in a single flow

Custom Verification Paths

Configure different verification steps based on user type or risk level

Multi-Step Onboarding

Guide users through complex onboarding processes with multiple validation steps

Compliance Workflows

Ensure regulatory compliance with predefined, auditable verification sequences

Configuration

The workflow configuration is managed server-side through the ticket system. Contact your FAD SDK administrator to:
  • Define workflow steps and their sequence
  • Configure step-specific parameters
  • Set validation rules and thresholds
  • Customize user interface elements

Notes

The startFadWeb4() method requires null as the token parameter in the FadSDK constructor, as authentication is handled through the ticket system.
Tickets are single-use and expire after a configured time period. Generate new tickets for each workflow execution.

Build docs developers (and LLMs) love