Card.IO Plugin
platforms: android,ios
$ cordova plugin add android plug-in for PhoneGap

This plug-in exposes's credit card scanning. ( also supports charging cards; that is not yet supported in this plug-in.)

Integration instructions

  • Add the library:

  • Add this plug-in:

    • Register the plugin in the res/xml/config.xml file.

    <plugin name="CardIOPGPlugin" value="com.cubettech.plugins.cardio.CardIOPGPlugin"/>

    • Add activity entry in AndroidManifext.xml

    <activity android:name="com.cubettech.plugins.cardio.CardIOMain" />

    • Add the package com.cubettech.plugins.cardio to your project's src folder. i.e, simply copy the com folder in your src directory
    • Copy CardIOPGPlugin.js to your project's www folder.
    • Add e.g. <script type="text/javascript" charset="utf-8" src="CardIOPGPlugin.js"></script> to your html.
    • In config.xml, add an entry to ExternalHosts with value *, ignore this if you have set <access origin=".*"/>.
    • See CardIOPGPlugin.js for detailed usage information.
    • Sample scan usage: window.plugins.CardIOPGPlugin.scan(onCardIOComplete, onCardIOCancel);
    • Your required fields & API key can be configure by modifying the array cardIOConfig in CardIOPGPlugin.js

Sample HTML + JS

<h1>Scan Example</h1>
<p><button id='scanBtn'>Scan now</button></p>
<script type="text/javascript">

        //Your response array contain these fields
    // redacted_card_number, card_number, expiry_month,expiry_year, cvv, zip

    var onCardIOComplete = function(response) {
        console.log(" scan completed");


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

    $('#scanBtn').click(function() {
        window.plugins.CardIOPGPlugin.scan(onCardIOComplete, onCardIOCancel);



Questions? Contact