Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Card IO

Improve this doc



  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add
    $ npm install --save @ionic-native/card-io@4
  2. Add this plugin to your app's module

Supported platforms


This plug-in exposes credit card scanning.

NOTE: If you would like to actually process a credit card charge, you might be interested in the PayPal Cordova Plug-in.

Requires Cordova plugin: For more info, please see the Card IO plugin docs.

Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the Info.plist file. Add the following lines in the main element.</p>

<string>To scan credit cards.</string>
import { CardIO } from '@ionic-native/card-io';

constructor(private cardIO: CardIO) { }


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

Instance Members


Check whether card scanning is currently available. (May vary by device, OS version, network connectivity, etc.)

Returns: Promise<boolean>


Scan a credit card with
Param Type Details
options CardIOOptions

Options for configuring the pluginOptional

Returns: Promise<any>


Retrieve the version of the library. Useful when contacting support.

Returns: Promise<string>


Param Type Details
requireExpiry boolean

Set to true to require expiry date

requireCVV boolean

The user will be prompted for the card CVV

requirePostalCode boolean

The user will be prompted for the card billing postal code.

suppressManual boolean

Removes the keyboard button from the scan screen.

restrictPostalCodeToNumericOnly boolean

The postal code will only collect numeric input. Set this if you know the expected country's postal code has only numeric postal codes.

keepApplicationTheme boolean

The theme for the Activity's will be set to the theme of the application.

requireCardholderName boolean

The user will be prompted for the cardholder name

scanInstructions string

Used to display instructions to the user while they are scanning their card.

noCamera boolean

If set, the card will not be scanned with the camera.

scanExpiry boolean

If scanExpiry is true, an attempt to extract the expiry from the card image will be made.

languageOrLocale string

The preferred language for all strings appearing in the user interface. If not set, or if set to null, defaults to the device's current language setting.

guideColor string | number

Changes the color of the guide overlay on the camera. The color is provided in hexadecimal format (e.g. #FFFFFF)

supressConfirmation boolean

The user will not be prompted to confirm their card number after processing.

hideCardIOLogo boolean

The logo will not be shown overlaid on the camera.

useCardIOLogo boolean

The logo will be shown instead of the PayPal logo.

supressScan boolean

Once a card image has been captured but before it has been processed, this value will determine whether to continue processing as usual.



Param Type Details
cardType string

Card type

redactedCardNumber string

Masked card number, showing only last 4 digits

cardNumber string

Full card number

expiryMonth number

Expiry month

expiryYear number

Expiry year

cvv string


postalCode string

Postal code

cardholderName string

Cardholder name