Contains the result of running the credit card scanner.

Constructors

Properties

creditCard: null | GenericDocument

Generic document containing credit card data. Not present, if status is FAIL.

detectionStatus: DocumentDetectionStatus

The status of the credit card detection step.

quad: Point[]

Coordinates of the detected credit card in the input image (clockwise from top-left).

quadNormalized: Point[]

Coordinates of the detected credit card in the input image (clockwise from top-left), normalized to the range [0, 1].

scanningStatus: CreditCardScanningStatus

The status of the credit card scanning step.

Methods

  • Returns Promise<void>

  • Returns void

  • Parameters

    Returns Promise<{
        creditCard?: null | {
            children?: {
                children?: { readonly type?: { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; } | undefined; ... 9 more ...; encodeImages?: (() ...;
                confidence?: number;
                confidenceWeight?: number;
                crop?: null | {
                    buffer: ...;
                    uniqueId?: ...;
                    clear?(): ...;
                    encodeImage?(options?): ...;
                    encodeInPlace?(): ...;
                    hibernate?(): ...;
                    info?(): ...;
                    isRetained?(): ...;
                    release?(): ...;
                    retain?(): ...;
                    saveImage?(path, options?): ...;
                    serialize?(imageSerializationMode): ...;
                } & {};
                fields?: {
                    confidenceWeight?: ...;
                    image?: ...;
                    parsedData?: ...;
                    polygonInRoot?: ...;
                    type?: ...;
                    validationStatus?: ...;
                    value?: ...;
                    encodeImages?(): ...;
                    release?(): ...;
                    serialize?(config?): ...;
                }[];
                quad?: Point[];
                quadInRoot?: Point[];
                type?: {
                    fullName?: (...) | (...);
                    listIndex?: (...) | (...) | (...);
                    name?: (...) | (...);
                    normalizedName?: (...) | (...);
                    serialize?(config?): { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
                };
                encodeImages?(): Promise<void>;
                release?(): void;
                serialize?(config?): Promise<({ readonly type?: { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; } | undefined; ... 9 more ...; encodeImages?: (() ...)>;
            }[];
            confidence?: number;
            confidenceWeight?: number;
            crop?: null | {
                buffer: undefined | string;
                uniqueId?: string;
                clear?(): Promise<void>;
                encodeImage?(options?): Promise<null | string>;
                encodeInPlace?(): Promise<void>;
                hibernate?(): Promise<void>;
                info?(): Promise<null | ImageInfo>;
                isRetained?(): boolean;
                release?(): void;
                retain?(): void;
                saveImage?(path, options?): Promise<boolean>;
                serialize?(imageSerializationMode): Promise<null | ({ readonly uniqueId?: string | undefined; readonly buffer?: string | undefined; serialize?: ((imageSerializationMode: ImageSerializationMode) => Promise<(... & {}) | null>) | undefined; ... 8 more ...; retain?: (() => void) | undefined; } & {})>;
            } & {};
            fields?: {
                confidenceWeight?: number;
                image?: null | {
                    buffer: ...;
                    uniqueId?: ...;
                    clear?(): ...;
                    encodeImage?(options?): ...;
                    encodeInPlace?(): ...;
                    hibernate?(): ...;
                    info?(): ...;
                    isRetained?(): ...;
                    release?(): ...;
                    retain?(): ...;
                    saveImage?(path, options?): ...;
                    serialize?(imageSerializationMode): ...;
                } & {};
                parsedData?: {
                    type?: ...;
                    value?: ...;
                    serialize?(config?): ...;
                }[];
                polygonInRoot?: Point[];
                type?: {
                    commonType?: (...) | (...) | (...);
                    fullName?: (...) | (...);
                    listIndex?: (...) | (...) | (...);
                    name?: (...) | (...);
                    normalizedName?: (...) | (...);
                    serialize?(config?): { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly commonType?: CommonFieldType | null | undefined; readonly listIndex?: number | ... 1 more ... | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
                };
                validationStatus?: FieldValidationStatus;
                value?: null | {
                    confidence?: ...;
                    text?: ...;
                    serialize?(config?): ...;
                } & {};
                encodeImages?(): Promise<void>;
                release?(): void;
                serialize?(config?): Promise<({ readonly type?: { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly commonType?: CommonFieldType | null | undefined; readonly listIndex?: number | ... 1 more ... | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...)>;
            }[];
            quad?: Point[];
            quadInRoot?: Point[];
            type?: {
                fullName?: string;
                listIndex?: null | number;
                name?: string;
                normalizedName?: string;
                serialize?(config?): { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
            };
            encodeImages?(): Promise<void>;
            release?(): void;
            serialize?(config?): Promise<{
                children?: ({ readonly type?: { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; } | undefined; ... 9 more ...; encodeImages?: (() ...)[];
                confidence?: number;
                confidenceWeight?: number;
                crop?: null | {
                    buffer: (...) | (...);
                    uniqueId?: (...) | (...);
                    clear?(): Promise<(...)>;
                    encodeImage?(options?): Promise<(...)>;
                    encodeInPlace?(): Promise<(...)>;
                    hibernate?(): Promise<(...)>;
                    info?(): Promise<(...)>;
                    isRetained?(): boolean;
                    release?(): void;
                    retain?(): void;
                    saveImage?(path, options?): Promise<(...)>;
                    serialize?(imageSerializationMode): Promise<(...)>;
                } & {};
                fields?: {
                    confidenceWeight?: (...) | (...);
                    image?: (...) | (...) | (...);
                    parsedData?: (...) | (...);
                    polygonInRoot?: (...) | (...);
                    type?: (...) | (...);
                    validationStatus?: (...) | (...);
                    value?: (...) | (...) | (...);
                    encodeImages?(): Promise<(...)>;
                    release?(): void;
                    serialize?(config?): Promise<(...)>;
                }[];
                quad?: Point[];
                quadInRoot?: Point[];
                type?: {
                    fullName?: string;
                    listIndex?: null | number;
                    name?: string;
                    normalizedName?: string;
                    serialize?(config?): { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
                };
                encodeImages?(): Promise<void>;
                release?(): void;
                serialize?(config?): Promise<{ readonly type?: { readonly name?: string | undefined; readonly fullName?: string | undefined; readonly normalizedName?: string | undefined; readonly listIndex?: number | null | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; } | undefined; ... 9 more ...; encodeImage...;
            }>;
        } & {};
        detectionStatus?: DocumentDetectionStatus;
        quad?: Point[];
        quadNormalized?: Point[];
        scanningStatus?: CreditCardScanningStatus;
        encodeImages?(): Promise<void>;
        release?(): void;
        serialize?(config?): Promise<{ readonly detectionStatus?: DocumentDetectionStatus | undefined; readonly scanningStatus?: CreditCardScanningStatus | undefined; ... 5 more ...; encodeImages?: (() => Promise<...>) | undefined; }>;
    }>