@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
17 lines (16 loc) • 1.06 kB
TypeScript
import type { InstantIdVerificationTokenRequest, InstantIdVerificationTokenResponse } from '../../core/models/api/instant-id-verification';
import type { MinimumApplicantDetails } from '../../components/Individual/forms/IdVerification/types';
import type { QueryOptions } from '../types';
export type QueryKeyIdVerificationToken = [
'idVerificationToken',
InstantIdVerificationTokenRequest
];
/**
* Retrieves a token that we can use to proceed with ID verification for the given set of applicant
* details.
*
* **Note:** on the backend we re-use an existing Onfido applicant if a `legalEntityId` is sent
* and we have previously generated a token for that same legal entity. Therefore, this request
* effectively idempotent.
*/
export declare const useIdVerificationToken: ({ firstName, lastName, residencyCountry }: MinimumApplicantDetails, legalEntityId: string | undefined, options?: Omit<QueryOptions<InstantIdVerificationTokenResponse>, "enabled">) => import("@tanstack/preact-query").UseQueryResult<InstantIdVerificationTokenResponse, Error>;