Skip to main content

Overview

The FAD SDK provides a comprehensive set of modules for identity verification, biometric authentication, and digital signature workflows. Each module is designed to handle specific use cases in the identity verification process.

Available Modules

Capture-id&R

Document capture and processing using Regula technology.
const CREDENTIALS = {
  license: 'your-regula-license',
  apiBasePath: 'your-api-base-path'
};

const idData = true;  // Include OCR extraction
const idPhoto = true; // Include face photo from ID

const response = await FAD_SDK.startRegula(
  CREDENTIALS,
  FadSDK.Constants.Regula.CaptureType.CAMERA_SNAPSHOT,
  idData,
  idPhoto,
  CONFIGURATION
);
Capabilities:
  • Document capture and processing
  • OCR (Optical Character Recognition) extraction
  • Document classification
  • Support for multiple capture types:
    • CAMERA_SNAPSHOT - Manual camera capture
    • DOCUMENT_READER - Automatic document detection
Use Cases:
  • ID verification
  • Passport scanning
  • Driver’s license capture

Capture-id&A

Advanced document capture with Acuant technology including validation alerts.
const response = await FAD_SDK.startAcuant(
  CREDENTIALS,
  idData,
  idPhoto,
  CONFIGURATION
);
Additional Capabilities:
  • All Capture-id&R features
  • Enhanced validation alerts:
    • Document expiration date validation
    • Date of birth verification
    • Document classification validation
    • Document number validation
    • Name validation on ID

Liveness-3D

Facial liveness detection with 3D analysis to prevent spoofing attacks.
const CREDENTIALS = {
  deviceKeyIdentifier: 'your-device-key',
  baseURL: '',
  publicFaceScanEncryptionKey: '-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----',
  productionKeyText: {
    domains: 'your-domains',
    expiryDate: 'YYYY-MM-DD',
    key: 'your-key'
  }
};

const response = await FAD_SDK.startFacetec(CREDENTIALS, CONFIGURATION);
Capabilities:
  • Liveness detection (proof of life)
  • Spoofing detection:
    • Photo detection
    • Video replay detection
    • Mask detection
  • High-quality face capture
  • Biometric data extraction

Signature

Digital signature capture with face detection and video recording.
const response = await FAD_SDK.startSignature(CONFIGURATION);

if (response.event === FadSDK.Constants.EventModule.PROCESS_COMPLETED) {
  const faceVideoUrl = URL.createObjectURL(response.data.videoFace);
  const signatureVideoUrl = URL.createObjectURL(response.data.videoSignature);
  const signatureImage = response.data.imageSignature;
}
Capabilities:
  • Signature pad for digital signing
  • Face detection during signature
  • Video recording of:
    • Face during signing process
    • Signature creation process
  • Signature biometrics extraction
Response Data:
  • videoFace - Blob of face video
  • videoSignature - Blob of signature video
  • imageSignature - Base64-encoded signature image

Videoagreement

Video recording with face detection and karaoke-style text display.
const LEGEND = 'I, [Name], with date of birth [DOB], agree to the terms...';

const response = await FAD_SDK.startVideoagreement(LEGEND, CONFIGURATION);

if (response.event === FadSDK.Constants.EventModule.PROCESS_COMPLETED) {
  const videoUrl = URL.createObjectURL(response.data.video);
}
Capabilities:
  • Face detection
  • Video recording
  • Karaoke-style text display
  • Custom legend/script support
Use Cases:
  • Terms and conditions acceptance
  • Consent recording
  • Video declarations

Videotaping

Advanced video recording with ID detection capabilities.
const LEGEND = 'I declare that the information provided is truthful...';

const response = await FAD_SDK.startVideotaping(LEGEND, CONFIGURATION);
Capabilities:
  • Face detection
  • ID detection (Mexican IDs and Passports):
    • ID MEX
    • Pasaporte MEX
  • Video recording
  • Karaoke-style text display

Capture-id

Basic document capture for Mexican identification documents.
const response = await FAD_SDK.startCaptureId(CREDENTIALS, CONFIGURATION);
Supported Documents:
  • IFE tipo C
  • INE tipo D, E, F, G, H, I
  • Mexican Passport
Capabilities:
  • Document capture
  • OCR extraction

Liveness-3D&I

Liveness detection with Identy technology.
const response = await FAD_SDK.startIdentyFace(CREDENTIALS, CONFIGURATION);
Capabilities:
  • Liveness detection
  • Spoofing detection (photos, videos, masks)

Fingerprints&I

Fingerprint capture and biometric processing.
const response = await FAD_SDK.startIdentyFingerprints(CREDENTIALS, CONFIGURATION);
Capabilities:
  • Fingerprint capture
  • Multi-finger support
  • Quality validation

Liveness&T

Liveness detection with TOC technology.
const response = await FAD_SDK.startLivenessToc(CREDENTIALS, CONFIGURATION);
Capabilities:
  • Liveness verification
  • Alternative liveness technology option

Fad Web 4

Document signing module.
const response = await FAD_SDK.startFadWeb4(CREDENTIALS, CONFIGURATION);
Capabilities:
  • Digital document signing
  • Document workflow management

Biometrics by Steps

Step-by-step biometric validation process.
const response = await FAD_SDK.startBiometricsBySteps(CONFIGURATION);
Capabilities:
  • Multi-step validation workflow
  • Progressive biometric capture

Module Events

All modules return responses with an event property indicating the outcome:
The module completed successfully and returned data.
if (response.event === FadSDK.Constants.EventModule.PROCESS_COMPLETED) {
  // Handle successful completion
  console.log(response.data);
}

Hardware Requirements

Hardware requirements vary by module type.

Global Requirements

  • RAM: 4GB+

Camera Modules

Video Recording Modules

Module Configuration

Most modules accept a CONFIGURATION object for customization:
const CONFIGURATION = {
  views: {
    instructions: true,  // Show instruction screen
    preview: true        // Show preview screen
  },
  disableDesktopView: false,
  customization: {
    fadCustomization: {
      colors: {
        primary: '#A70635',
        secondary: '#A70635',
        tertiary: '#363636',
        succesful: '#5A9A92'
      },
      buttons: {
        primary: {
          backgroundColor: '#A70635',
          labelColor: '#ffffff',
          borderColor: '#A70635',
          borderStyle: 'solid',
          borderWidth: '1px'
        }
      },
      fonts: {
        title: { fontSize: '25px', fontFamily: 'system-ui' },
        subtitle: { fontSize: '17px', fontFamily: 'system-ui' }
      }
    },
    moduleCustomization: {
      legends: {
        // Module-specific legend customization
      },
      style: {
        // Module-specific styling
      }
    }
  }
};

Common Patterns

Module Lifecycle

All modules follow the same lifecycle pattern:
import FadSDK from '@fad-producto/fad-sdk';

async function runModule() {
  // 1. Initialize
  const options = { environment: FadSDK.getFadEnvironments().UATHA };
  const FAD_SDK = new FadSDK(TOKEN, options);
  
  try {
    // 2. Execute module
    const response = await FAD_SDK.startModuleName(/* params */);
    
    // 3. Check event type
    if (response.event === FadSDK.Constants.EventModule.MODULE_CLOSED) {
      return; // User cancelled
    }
    
    // 4. Process results
    console.log(response.data);
    
  } catch (error) {
    // 5. Handle errors
    console.error(error);
  } finally {
    // 6. Cleanup
    FAD_SDK.end();
  }
}

Next Steps

Error Handling

Learn how to handle module-specific errors

Examples

View complete examples for each module

Build docs developers (and LLMs) love