Skip to main content

Scanning a credit card from an image file with the Web Credit Card Scanner Module

In addition to live detection, the Credit Card Scanner Module can extract information from still images imported from the gallery or any other source.

Once the scanning is done, the scanner returns the same result type as the live scanner.

scanbotSDK.API.CreditCardScanner.create(): Promise<Config.CreditCardScanner>

Example usage:

reader.readAsArrayBuffer(file);

reader.onload = async (e) => {
const engine = await scanbotSDK.API.CreditCardScanner.create();
const buffer = reader.result as ArrayBuffer;
const image = ScanbotSDK.Config.Image.fromEncodedBinaryData(buffer);
const result = await engine.run(image);
await engine.destroy();
};

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license