Skip to main content
Version: v3000

Result object reference

This article describes the structure of the result returned by BlinkCard after a successful scan.

note

The result is the BlinkCardScanningResult type, and its structure is the same on Web, Android, and iOS. The field names match across platforms. Where access differs, for example a field that is optional on one platform but not another, this article calls it out.

Where the result comes from​

You get the result either from the camera UI result callback, or from a photo-mode session. In both cases it is the same object, the scanning result.

blinkCard.addOnResultCallback((result) => {
// result is a BlinkCardScanningResult
});

Top-level structure​

The scanning result contains:

  • cardAccounts: the payment accounts found on the card. See card accounts.
  • cardholderName: the cardholder name, or empty if absent or not extracted (undefined on web, null on Android, nil on iOS).
  • iban: the IBAN, or empty if absent or not extracted (undefined on web, null on Android, nil on iOS).
  • issuingNetwork: the card's issuing network (for example "visa" or "mastercard").
  • overallCardLivenessResult: the combined liveness verdict. See liveness and per-side data.
  • firstSideResult, secondSideResult: the per-side image and liveness detail. Each is empty until the corresponding side has been scanned.

Card accounts​

A card can carry more than one payment account, so account data lives in the cardAccounts array. For a standard single-account card, read the first entry.

Each account contains:

  • cardNumber: the card number as scanned
  • cardNumberValid: whether the number passed Luhn checksum validation
  • cardNumberPrefix: the card number prefix
  • cvv: the security code, usually present only after the back side is scanned
  • expiryDate: the expiry date as a date result. On web and Android this field is non-optional on the account; on iOS it is optional (DateResult?).
  • fundingType: the funding type, for example "DEBIT", "CREDIT", or "CHARGE CARD"
  • cardCategory: the card tier or service level, for example "PERSONAL", "BUSINESS", or "PREPAID"
  • issuerName: the issuing financial institution
  • issuerCountryCode: the ISO 3166-1 alpha-3 country code of the issuer, for example "USA"
  • issuerCountry: the issuer's country name
const account = result.cardAccounts[0];
const number = account.cardNumber;
const valid = account.cardNumberValid;
const network = result.issuingNetwork;

Date results​

The expiry date is a date result, which exposes the parsed parts plus the original text:

  • day, month, year: the parsed numeric components
  • originalString: the date exactly as printed on the card
  • successfullyParsed: whether the string was parsed into numeric parts
  • filledByDomainKnowledge: whether the SDK inferred the date rather than reading it
const expiry = result.cardAccounts[0].expiryDate;
console.log(expiry.month, expiry.year, expiry.originalString);

Liveness and per-side data​

overallCardLivenessResult is the combined liveness verdict across all checks. A check result is one of three values, expressed per platform as: web strings "pass", "fail", or "not-available"; Android enum cases CheckResult.Pass, CheckResult.Fail, or CheckResult.NotAvailable; iOS enum cases .pass, .fail, or .notAvailable.

firstSideResult and secondSideResult hold the data specific to each scanned side:

  • cardImage: the cropped card image for that side, or empty when image return is not enabled. On web the pixels are exposed through cardImage.image as an ImageData; on Android and iOS cardImage exposes a platform-specific cropped image type.
  • cardLivenessCheckResult: the individual liveness verdicts for that side, each a check result as described above:
    • screenCheckResult: whether the card was displayed on a screen
    • photocopyCheckResult: whether the card was a photocopy
    • cardHeldInHandCheckResult: whether the card was held in a hand

For how to read and act on these checks, see Detect fraud and liveness.