Card IO plugin- scan and charge credit cards with a mobile phone

Has anyone implemented the CardIO

I could not get this to work for me

Any help greatly appreciated!

1 Like

I was able to get this working. I added plugin. Then in my controller I added function that I called scanCard which was attached to my button with id scanBtn, which was triggered using ng-click. Here is how I edited the javascript they used in phonegap example in my controller.

$scope.scanCard = function(){
    var cardIOResponseFields = [

    var onCardIOComplete = function(response) {
      for (var i = 0, len = cardIOResponseFields.length; i < len; i++) {
        var field = cardIOResponseFields[i];
        console.log(field + ": " + response[field]);

    var onCardIOCancel = function() {
      console.log(" scan cancelled");

    var onCardIOCheck = function (canScan) {
      console.log(" canScan? " + canScan);
      var scanBtn = angular.element($("#scanBtn")).scope();
      //var scanBtn = document.getElementById("scanBtn");
      if (!canScan) {
        scanBtn.innerHTML = "Manual entry";

      "collect_expiry": true,
      "collect_cvv": false,
      "collect_zip": false,
      "shows_first_use_alert": true,
      "disable_manual_entry_buttons": false


thanks, this works very well

I am getting a linker error on ios

clang: error: linker command failed with exit code 1 (use -v to see invocation)

If you disable bitcode you can get it working, although this isn’t really the most desireable fix.

Hi Where can i find the plugin, you added Katmartunez


If you get this working can you please provide some more information regarding adding cardIO module.

Do I need to include any js file in index.html after installing this plugin ?

And what module name do I need to attach and need to pass in angular controller ?

Thank you !

Hi katmartinez,

Am using the same code as you mention in this post. But am always getting the scan cancelled and Could not detect whether card scanning is available. Is there any missing. Please pull me out from this issue.
Thanks in advance.

I got this working for iOS. But for Android 6.1 I can see the card scanned in the debug console but it doesn’t return it to the view. Any thoughts?

Update: It work for Android all versions except unless i don’t put alert( ); the camera doesn’t activate. i am using platform ready command. Any thoughts?

Hi all , what kind of reader are you using? I algo need to implement the reading functionality in my app. Thanks to all.
Note : i may buy this:,searchweb201602_2_10057_10056_10065_10037_10068_10055_10054_10069_301_10059_10033_10058_10032_10073_10017_10070_10060_10061_10052_10062_10053_10050_10051,searchweb201603_3&btsid=40e34170-e6ed-4b43-a805-05e806b4f9d4

Hi @katmartinez08,

Appreciate if you can share more detail regarding to ading CardIO module.


how can I do on ionic v2?


1 Like

Simply use this func when you install plugin from ionic offical website

  (res: boolean) => {
    if (res) {
      let options = {
        requireExpiry: true,
        requireCVV: false,
        requirePostalCode: false

).catch(function (error) {


Did you include any js file in index.html?
I have installed plugin and I’m getting an error: CardIO is not defined
Anyone get this error also?