Service class for managing customer verification related operations.

Hierarchy

  • ApiService
    • CustomerVerificationService

Methods

  • Retrieves a KYC Session by its ID.

    Parameters

    • sessionId: string

      Id of the session to retrieve

    Returns Promise<KycSession>

    A Promise that resolves to the KYC session.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    customerVerificationService.getKycSession('session-id')
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error fetching KYC session.`);
    });
  • Retrieves customer verification status.

    Returns Promise<KycVerification>

    A Promise that resolves to the KYC sessions.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    customerVerificationService.getKycVerificationStatus()
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error fetching customer verification status.`);
    });
  • Creates a KYC session. This will start the KYC process for the customer. Response body will contain a session URL that can be used to redirect the customer to the Paysafe KYC application.

    Parameters

    Returns Promise<KycSession>

    A Promise that resolves to the created KYC session.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    customerVerificationService.startKycSession(request)
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error starting KYC session.`);
    });
  • Retrieves the singleton instance of the CustomerVerificationService class.

    Returns CustomerVerificationService

    The singleton instance of the CustomerVerificationService class.

    Function

    Static

    Example

    // Example usage:
    const customerVerificationService = CustomerVerificationService.getInstance();