Scan credit cards and debit cards using device camera OCR for instant payment checkout auto-fill.
Scan credit card details instantly using the device camera. Nativine embeds native Card.io and ML Kit Credit Card OCR scanner viewports, allowing users to auto-populate card numbers, expiration dates, and cardholder names into web checkout inputs without manual typing.
Typing 16-digit credit card numbers on mobile keyboards introduces checkout friction. Nativine's Card.io plugin provides hardware-accelerated camera OCR scanning:
To open the Card.io camera scanner modal from JavaScript, call nativine.cardScanner.scanCard():
nativine.cardScanner.scanCard({
requireCardholderName: true,
requireExpiry: true,
callback: 'onCardScanned',
onCancel: 'onCardScanCancelled'
});
function onCardScanned(card) {
console.log("Card Number:", card.cardNumber);
console.log("Expiry Month/Year:", card.expiryMonth, card.expiryYear);
console.log("Cardholder Name:", card.cardholderName);
}
| Parameter | Type | Description |
|---|---|---|
requireCardholderName | boolean | Optional. Set true to scan cardholder name text. |
callback | string | Required. JS callback function receiving scanned card details object. |
No. For PCI-DSS compliance, CVV codes are never scanned; users enter their CVV code manually.
Yes. The camera scanner overlay includes a flashlight toggle button for scanning cards in dim lighting.