BlinkCard mobile SDK

Add AI-driven credit card scanning to your iOS or Android app.

BlinkCard runs multiple machine learning models on any smartphone to read more than 1,700 types of credit and debit cards from 12 major networks, including Visa and Mastercard. It’s also:

  • Easy to integrate: Sample code, release notes, documentation and everything else you need to integrate the SDK can be found in our Github repositories down below.
  • Even easier to use: A clean camera screen, real-time messages to the user and built-in field validation of the results make credit card scanning a seamless experience.
  • Localized: Support for 21 major languages lets you reach people from all corners of the world. 
  • Customizable: You’re free to customize the look and feel of the UI to your brand and target audience. 
  • Lightweight: Compressed, BlinkCard SDK averages 5MB, keeping your final app heavy on features but light on size.

Find out more about BlinkCard

The SDK returns the following results: card number, card issuer, cardholder name, expiration date, CVV number, IBAN and a cropped image of the scanned card.

Integration guides are available in our Github repositories below. To get your free trial license key (no cc required), register on our Developer Dashboard.

Try BlinkCard on your smartphone

Get the free Microblink Vision demo app from any major app store to see our SDKs in action.

Integration sample code

Copy to clipboard
 * Set your license file. The recommended way is extending the Android Application class
 * and setting the license file in its onCreate callback.
 * Register on our dashboard to get the license key for your app.
public class MyApplication extends Application {
    public void onCreate() {
        MicroblinkSDK.setLicenseFile("path/to/license/file/within/assets/dir", this);

public class MyActivity extends Activity {
    private BlinkCardRecognizer mRecognizer;
    private RecognizerBundle mRecognizerBundle;
    protected void onCreate(Bundle bundle) {
        // setup views, as you would normally do in onCreate callback
        // create BlinkCardRecognizer for scanning payment/debit card
        // see for options
        mRecognizer = new BlinkCardRecognizer();

        // bundle recognizer into RecognizerBundle
        mRecognizerBundle = new RecognizerBundle(mRecognizer);
    public void startScanning() {
        // Settings for BlinkCardActivity
        BlinkCardUISettings settings = new BlinkCardUISettings(mRecognizerBundle);
        // tweak settings as you wish
        // Start activity
        ActivityRunner.startActivityForResult(this, MY_REQUEST_CODE, settings);
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == MY_REQUEST_CODE) {
            if (resultCode == BlinkCardActivity.RESULT_OK && data != null) {
                // load the data into all recognizers bundled within your RecognizerBundle

                // now every recognizer object that was bundled within RecognizerBundle
                // has been updated with results obtained during the scanning session

                // you can get the result by invoking getResult on recognizer
                BlinkCardRecognizer.Result result = mRecognizer.getResult();
                if (result.getResultState() == Recognizer.Result.State.Valid) {
                    // result is valid, you can use it however you wish

Copy to clipboard
import UIKit
import MicroBlink

class ViewController: UIViewController {
    var blinkCardRecognizer: MBBlinkCardRecognizer!
    override func viewDidLoad() {
        MBMicroblinkSDK.sharedInstance().setLicenseResource("license", withExtension: "txt", inSubdirectory: "", for: Bundle.main)

    @IBAction func didTapScan(_ sender: Any) {
        blinkCardRecognizer = MBBlinkCardRecognizer()
        blinkCardRecognizer.extractCvv = false
        blinkCardRecognizer.returnFullDocumentImage = true
        let recognizerCollection = MBRecognizerCollection(recognizers: [blinkCardRecognizer])
        let blinkCardOverlaySettings = MBBlinkCardOverlaySettings()
        let blinkCardOverlayViewController = MBBlinkCardOverlayViewController(settings: blinkCardOverlaySettings, recognizerCollection: recognizerCollection, delegate: self)
        let recognizerRunnerViewController: UIViewController = MBViewControllerFactory.recognizerRunnerViewController(withOverlayViewController: blinkCardOverlayViewController)
        present(recognizerRunnerViewController, animated: true, completion: nil)

extension ViewController: MBBlinkCardOverlayViewControllerDelegate {
    func blinkCardOverlayViewControllerDidFinishScanning(_ blinkCardOverlayViewController: MBBlinkCardOverlayViewController, state: MBRecognizerResultState) {
        /** This is done on background thread */
        var message: String = ""
        var title: String = ""
        if blinkCardRecognizer.result.resultState == MBRecognizerResultState.valid {
            title = "Payment card"
            let fullDocumentImage: UIImage! = blinkCardRecognizer.result.fullDocumentFrontImage?.image
            print("Got payment card image with width: \(fullDocumentImage.size.width), height: \(fullDocumentImage.size.height)")
            // Save the string representation of the code
            message = blinkCardRecognizer.result.description
        /** Needs to be called on main thread beacuse everything prior is on background thread */
        DispatchQueue.main.async {
            // present the alert view with scanned results
            let alertController: UIAlertController = UIAlertController.init(title: title, message: message, preferredStyle: .alert)
            let okAction: UIAlertAction = UIAlertAction.init(title: "OK", style: .default,
                                                             handler: { (action) -> Void in
                                                                self.dismiss(animated: true, completion: nil)
            blinkCardOverlayViewController.present(alertController, animated: true, completion: nil)
    func blinkCardOverlayViewControllerDidTapClose(_ blinkCardOverlayViewController: MBBlinkCardOverlayViewController) {
        self.dismiss(animated: true, completion: nil)
Copy to clipboard
#import "ViewController.h"
#import <UIKit/UIKit.h>
#import <Microblink/Microblink.h>

@interface ViewController () <MBBlinkCardOverlayViewControllerDelegate>

@property (nonatomic, nonnull) MBBlinkCardRecognizer *blinkCardRecognizer;


@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [[MBMicroblinkSDK sharedInstance] setLicenseResource:@"license" withExtension:@"txt" inSubdirectory:@"" forBundle:NSBundle.mainBundle];

- (IBAction)didTapScan:(id)sender {
    self.blinkCardRecognizer = [[MBBlinkCardRecognizer alloc] init];
    self.blinkCardRecognizer.extractCvv = NO;
    self.blinkCardRecognizer.returnFullDocumentImage = YES;
    MBRecognizerCollection *recognizerCollection = [[MBRecognizerCollection alloc] initWithRecognizers:@[self.blinkCardRecognizer]];
    MBBlinkCardOverlaySettings *overlaySettings = [[MBBlinkCardOverlaySettings alloc] init];
    MBBlinkCardOverlayViewController *blinkCardOveralyViewController = [[MBBlinkCardOverlayViewController alloc] initWithSettings:overlaySettings recognizerCollection:recognizerCollection delegate:self];
    UIViewController<MBRecognizerRunnerViewController>* recognizerRunnerViewController = [MBViewControllerFactory recognizerRunnerViewControllerWithOverlayViewController:blinkCardOveralyViewController];
    [self presentViewController:recognizerRunnerViewController animated:YES completion:nil];

- (void)blinkCardOverlayViewControllerDidFinishScanning:(nonnull MBBlinkCardOverlayViewController *)blinkCardOverlayViewController state:(MBRecognizerResultState)state {
    [blinkCardOverlayViewController.recognizerRunnerViewController pauseScanning];

    NSString *title;
    NSString *message;
    if (self.blinkCardRecognizer.result.resultState == MBRecognizerResultStateValid) {
        title = @"Payment card";
        UIImage *fullDocumentImage = self.blinkCardRecognizer.result.fullDocumentFrontImage.image;
        NSLog(@"Got payment card image with width: %f, height: %f", fullDocumentImage.size.width, fullDocumentImage.size.height);
        message = self.blinkCardRecognizer.result.description;
    dispatch_async(dispatch_get_main_queue(), ^{
        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [self dismissViewControllerAnimated:YES completion:nil];
        [alertController addAction:okAction];
        [blinkCardOverlayViewController presentViewController:alertController animated:YES completion:nil];

- (void)blinkCardOverlayViewControllerDidTapClose:(nonnull MBBlinkCardOverlayViewController *)blinkCardOverlayViewController {
    [blinkCardOverlayViewController dismissViewControllerAnimated:YES completion:nil];