Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.quepass.com/llms.txt

Use this file to discover all available pages before exploring further.

1. Function

Quepass.LaunchJourney({
  journey: string;
  biometricType?: "face" | "hand";
  uid?: string;
  documentType?: string;
  image?: string;
  eventId?: string;
  ticketType?: string;
  onboardingFlow?: any;
  activeLiveness?: boolean;
  passiveLiveness?: boolean;
  kioskMode?: boolean;
  govVerification?: boolean;
  qrPayload?: { data: string; signature: string };
  documentIdentifierNationality?: string;
  documentIdentifierNumber?: string;
  documentIdentifierType?: string;
  onBack: () => void;
  onSuccess: (result: {code: number,data: any}) => void;
  onFail: (error: {code: number,errors: [{ code: string, message: string}]}) => void;
})

2. Required Parameters by Journey

JourneyRequired Parameters
OnboardingonBack, onSuccess, onFail, onboardingFlow
AuthenticationonBack, onSuccess, onFail, biometricType, documentType, uid
TransactiononBack, onSuccess, onFail, biometricType, uid
SearchonBack, onSuccess, onFail, biometricType
SearchByImageonBack, onSuccess, onFail, biometricType, image
KioskModeonBack, onSuccess, onFail
EventQRRegistrationonBack, onSuccess, onFail, eventId, ticketType
EventBiometricCheckInonBack, onSuccess, onFail, eventId
EventBiometricCheckInKioskonBack, onSuccess, onFail, eventId
CheckinByQRonBack, onSuccess, onFail, eventId, qrPayload
ExpressVerificationonBack, onSuccess, onFail, documentIdentifierType, documentIdentifierNumber
ExpressOnboardingonBack, onSuccess, onFail, documentIdentifierType, documentIdentifierNumber
ExchangeOnboardingonBack, onSuccess, onFail, documentIdentifierType, documentIdentifierNumber

3. Journey Examples

1. Onboarding

Required Parameters

  • onBack (function) – Triggered when user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • onboardingFlow (boolean) – Defines whether onboarding flow is enabled or not

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (optional)

Code Example

// Register.tsx
import { Quepass } from '@quepass/sdk';
const configuration = JSON.parse(localStorage.getItem('configuration') || '{}');
const onboardingFlow = configuration?.onboardingFlow;
const app = Quepass.LaunchJourney({
    journey:         'Onboarding',
    onboardingFlow:  onboardingFlow,          // from channel config
    govVerification: localStorage.getItem('govIntegration')  === 'true',
    onBack:    () => { setIsKYC(false); navigate(-1); },
    onSuccess: (res) => {
      setIsKYC(false);
      setUID(res?.data?.uid   ?? null);
      setToken(res?.data?.token ?? null);
    },
    onFail: (res) => navigate('/error', { state: res }),
  });

2. Authentication

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • biometricType (string) – Defines the type of biometric verification (e.g., face, fingerprint)
  • documentType (string) – Specifies the type of document required for verification
  • uid (string) – User identity

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (optional)

Code Example

  const app = Quepass.LaunchJourney({
    journey:         'Authentication',
    documentType:    credentials.documentType,   // 'uid' | 'passport' | 'idcard'
    uid:             credentials.documentNumber,
    biometricType:   credentials.authMethod,     // 'face' | 'hand'
    activeLiveness:  localStorage.getItem('activeLiveness')  === 'true',
    passiveLiveness: localStorage.getItem('passiveLiveness') === 'true',
    kioskMode:       localStorage.getItem('mode')            === 'true',
    eventId:         selectedEvent ?? '',
    govVerification: localStorage.getItem('govIntegration')  === 'true',
    onBack:    () => setIsKYC(false),
    onSuccess: (res) => {
      if (res?.data?.uid) {
        setUID(res.data.uid);  setToken(res.data.token);
      } else { setNotFound(true); }
      setIsKYC(false);
    },
    onFail: (res) => navigate('/error', { state: res }),
  });

3. Transaction

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • biometricType (string) – Defines the type of biometric verification (e.g., face, fingerprint)
  • uid (string) – User identity

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (optional)

Code Example

// Transaction.tsx
  const app = Quepass.LaunchJourney({
    journey:         'Transaction',
    uid:             credentials.documentNumber,
    biometricType:   credentials.authMethod,
    activeLiveness:  localStorage.getItem('activeLiveness')  === 'true',
    passiveLiveness: localStorage.getItem('passiveLiveness') === 'true',
    kioskMode:       localStorage.getItem('mode')            === 'true',
    eventId:         selectedEvent ?? '',
    govVerification: localStorage.getItem('govIntegration')  === 'true',
    onBack:    () => setIsKYC(false),
    onSuccess: (res) => {
      if (res?.data?.uid) { setUID(res.data.uid); setToken(res.data.token); }
      else { setNotFound(true); }
      setIsKYC(false);
    },
    onFail: (res) => navigate('/error', { state: res }),
  });

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • biometricType (string) – Defines the type of biometric verification (e.g., face, fingerprint)

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (optional)

Code Example

// FaceSearch.tsx
const app = Quepass.LaunchJourney({
  journey:         'Search',
  biometricType:   'face',
  activeLiveness:  localStorage.getItem('activeLiveness')  === 'true',
  passiveLiveness: localStorage.getItem('passiveLiveness') === 'true',
  kioskMode:       localStorage.getItem('mode')            === 'true',
  eventId:         selectedEvent ?? '',
  govVerification: localStorage.getItem('govIntegration')  === 'true',
  onBack:    () => navigate(-1),
  onSuccess: (res) => {
    if (res?.data?.uid) {
      setUID(res.data.uid);  setToken(res.data.token);  setIsCompleted(true);
    } else { setNotFound(true); }
  },
  onFail: (res) => navigate('/error', { state: res }),
});

5. SearchByImg

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • biometricType (string) – Defines the type of biometric verification (e.g., face, fingerprint)
  • image (string) – Base64-encoded image data or image file path used for verification

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (may be empty if not applicable)

Code Example

// FaceCapture.tsx
// 1. Capture frame from <video> element
const canvas = document.createElement('canvas');
canvas.width  = videoElement.videoWidth;
canvas.height = videoElement.videoHeight;
canvas.getContext('2d')!.drawImage(videoElement, 0, 0);
const imageData = canvas.toDataURL('image/jpeg');

// 2. Call SDK
const response = await Quepass.LaunchJourney({
  journey:         'SearchByImage',
  biometricType:   'face',
  image:           imageData,                // Base64 data URI
  eventId:         selectedEvent ?? '',
  govVerification: localStorage.getItem('govIntegration') === 'true',
  onBack: () => {}, onSuccess: () => {}, onFail: () => {},
});

6. KioskMode  —  Kiosk Face

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • isCaptured (boolean) – Indicates whether biometric/image was successfully captured
  • isFound (boolean) – Indicates whether a matching user record was found in the system

Code Example

// KioskFace.tsx
  const app = Quepass.LaunchJourney({
    journey:         'KioskMode',
    govVerification: localStorage.getItem('govIntegration') === 'true',
    onBack:    () => {},
    onSuccess: (res) => {
      // Stage 1 — image captured
      if (res?.data?.isCaptured && res?.code === 200) {
        setIsCaptured(true);  setIsSearching(true);  return;
      }
      // Stage 2 — match found
      if (res?.data?.isFound === true && res?.data?.uid) {
        setUID(res.data.uid);  setToken(res.data.token);  return;
      }
      // Stage 3 — no match
      if (res?.data?.isFound === false) {
        setNotFound(true);  setTimeout(() => resetState(), 2000);
      }
    },
    onFail: (res) => {
      setMessage(res?.errors?.[0]?.message ?? 'Error');
      setTimeout(() => resetState(), 2000);
    },
  });

7. EventQRRegistration  —  Register for Event

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • eventId (string) – Unique identifier for the event
  • ticketType (string) – Specifies the type or category of ticket for the event

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • payload (object) – Encrypted QR/Event payload data
    • data (string) – Encrypted payload data (Base64 encoded)
    • signature (string) – Digital signature for payload verification

Code Example

// RegisterEvent.tsx
  const app = Quepass.LaunchJourney({
    journey:         'EventQRRegistration',
    eventId:         selectedEvent,
    ticketType:      selectedTicketType,
    govVerification: localStorage.getItem('govIntegration') === 'true',
    onBack: () => {},
    onSuccess: (res) => {
      if (res?.code === 200) {
        setIsKYC(false);
        navigate('/event-pass', {
          state: { uid: res?.data?.uid, token: res?.data?.token, event: selectedEvent },
        });
      }
    },
    onFail: (res) => navigate('/error', { state: res }),
  });

8. EventQRRegistration  —  FaceCheckin

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • eventId (string) – Unique identifier for the event

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • isCaptured (boolean) – Indicates whether biometric/image was successfully captured
  • isFound (boolean) – Indicates whether a matching user record was found in the system

Code Example

// FaceCheckin.tsx
  const app = Quepass.LaunchJourney({
    journey:         'EventBiometricCheckIn',
    eventId:         selectedEvent,
    uid:             documentNumber ?? '',
    documentType:    selectedType   ?? '',
    govVerification: localStorage.getItem('govIntegration') === 'true',
    onBack: () => {},
    onSuccess: (res) => {
      if (res?.data?.isCaptured && res?.code === 200) {
        setIsCaptured(true);  setIsSearching(true);  return;
      }
      if (res?.data?.isFound === true && res?.data?.uid) {
        setUID(res.data.uid);  setToken(res.data.token);  setIsCompleted(true);  return;
      }
      if (res?.data?.isFound === false) {
        setNotFound(true);
        setMessage(res?.errors?.[0]?.message ?? 'Not found.');
      }
    },
    onFail: (res) => navigate('/error', { state: res }),
  });

9. EventBiometricCheckIn  —  Kiosk Face Check-in 

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • isCaptured (boolean) – Indicates whether biometric/image was successfully captured
  • isFound (boolean) – Indicates whether a matching user record was found in the system

Code Example

// KioskFaceCheckin.tsx
  const app = Quepass.LaunchJourney({
    journey:         'EventBiometricCheckIn',
    eventId:         selectedEvent,
    govVerification: localStorage.getItem('govIntegration') === 'true',
    onBack: () => {},
    onSuccess: (res) => {
      if (res?.data?.isCaptured && res?.code === 200) {
        setIsCaptured(true);  setIsSearching(true);  return;
      }
      if (res?.data?.isFound === true && res?.data?.uid) {
        setUID(res.data.uid);  setToken(res.data.token);  setIsFound(true);  return;
      }
      if (res?.data?.isFound === false) {
        setNotFound(true);
        setMessage(res?.errors?.[0]?.message ?? 'Not found.');
        setTimeout(() => resetState(), 2000);
      }
    },
    onFail: (res) => {
      setMessage(res?.errors?.[0]?.message ?? 'Check-in failed.');
      setTimeout(() => resetState(), 2000);
    },
  });

10. CheckinByQR  —  QR Check-in

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • eventId (string) – Unique identifier for the event
  • qrPayload (string) – Encoded QR data used for validation or event verification

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token

Code Example

// KioskQRCheckin.tsx
const parsed = JSON.parse(scanResult.raw);   // { data: string; signature: string }

const response = await Quepass.LaunchJourney({
  journey:   'CheckinByQR',
  qrPayload: {
    data:      parsed.data,
    signature: parsed.signature,
  },
  eventId:         selectedEvent ?? '',
  govVerification: localStorage.getItem('govIntegration') === 'true',
  onBack: () => {}, onSuccess: () => {}, onFail: () => {},
});

if (response?.code === 200) {
  setUID(response?.data?.uid   ?? '');
  setToken(response?.data?.token ?? '');
} else {
  setMessage(response?.errors?.[0]?.message ?? 'Invalid QR.');
  setNotFound(true);
  setTimeout(() => resetState(), 2000);
}

11. ExpressVerification

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • documentIdentifierType (string) – Specifies the type of document identifier (e.g., passport, ID card)
  • documentIdentifierNumber (string) – The number associated with the specified document identifier

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (optional)

Code Example

const res = await Quepass.LaunchJourney({
      journey: "ExpressVerification",
      documentIdentifierType: documentIdentifierType ,
      documentIdentifierNumber: documentIdentifierNumber,
      documentIdentifierNationality: documentIdentifierNationality || undefined , //optional depends on the documentIdentifierType 
      onBack: () => { },
      onSuccess: () => { },
      onFail: () => { },
    })

12. ExpressOnboarding

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • documentIdentifierType (string) – Specifies the type of document identifier (e.g., passport, ID card)
  • documentIdentifierNumber (string) – The number associated with the specified document identifier

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • unifiedNumber (string) – Unified identification number (optional)

Code Example

const app = Quepass.LaunchJourney({
      journey: "ExpressOnboarding",
      onSuccess: (res: unknown) => {
        console.log("onSuccess SDK Response", res);
      },
      onFail: (res: Record<string, unknown>) => {
        console.log("onFail SDK Response", res);
      },
      onBack: () => {

      },
      documentIdentifierType: type,
      documentIdentifierNumber: documentNumber,
      documentIdentifierNationality: nationality || undefined, //optional depends on the documentIdentifierType 
    })

13. ExchangeOnboarding

Required Parameters

  • onBack (function) – Triggered when the user presses the back action
  • onSuccess (function) – Triggered when the process completes successfully
  • onFail (function) – Triggered when the process fails or returns an error
  • onboardingFlow (boolean) – Indicates whether the onboarding flow is enabled or not

Return Parameters

  • uid (string) – User identity
  • token (string) – Authentication token
  • boardingPassDTO (object) – Data transfer object containing details of the boarding pass (e.g., flight info, seat number, passenger name)
  • documentDTO (object) – Data transfer object containing details of the document (e.g., type, number, expiry date)

Code Example

const configuration = JSON.parse(localStorage.getItem('configuration') || '{}');
const onboardingFlow = configuration?.onboardingFlow;
let app = Quepass.LaunchJourney({
      journey: "ExchangeOnboarding",
      onboardingFlow:  onboardingFlow,          // from channel config
      onBack: () => {}, 
      onSuccess: () => {}, 
      onFail: () => {},
    })