API for credit card scanning.

Required licence feature(s): CreditCardScanner.

Methods

  • Clears the accumulated results. Should be called after a document has been scanned to the customers satisfaction to prevent a poisoned cache.

    Returns Promise<void>

  • Frees up any resources associated with this object. No other methods may be called on this object after destroy has been called.

    Returns Promise<void>

  • Parameters

    • workerBridge: WorkerBridge
    • Optional configuration: {
          processingMode?: ProcessingMode;
          requireCardholderName?: boolean;
          requireExpiryDate?: boolean;
          resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; };
          returnCreditCardImage?: boolean;
          useDocumentDetector?: boolean;
      }
      • Optional processingMode?: ProcessingMode

        Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

        On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

        Default Value

        "AUTO";
        
      • Optional requireCardholderName?: boolean

        Whether the cardholder name is required for a successful scan.

        Default Value

        true;
        
      • Optional requireExpiryDate?: boolean

        Whether the expiry date is required for a successful scan.

        Default Value

        true;
        
      • Optional resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }

        Configuration for how to accumulate results.

        Default Value

        new ResultAccumulationConfiguration({});
        
      • Optional returnCreditCardImage?: boolean

        If true, the credit card image will be returned in creditCard field of CreditCardScanningResult.

        Default Value

        false;
        
      • Optional useDocumentDetector?: boolean

        If true, the document detector will be used to find where the credit card is in the input image. If false, the scanner will assume that the credit card has been pre-cropped and takes the entirety of the input image.

        Default Value

        true;
        

    Returns Promise<CreditCardScanner>

Generated using TypeDoc