PayCards Plugin for Xamarin iOS and Android

Build Status

Simple cross platform plugin that uses Pay.Cards library to scan credit card information.



Platform Support

Platform Version
Xamarin.iOS iOS 12+
Xamarin.Android API 9+

API Usage

Call CrossPayCards.Current from any project to gain access to APIs.

Getting Started

After installing the package in your shared, iOS and Android projects you should do the following setup on each platform:

Android Setup

Call PayCardsRecognizerService.Initialize in MainActivity OnCreate method

        protected override void OnCreate(Bundle savedInstanceState)
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;


            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());

Override MainActivity OnActivityResult and call PayCardsRecognizerService.OnActivityResult

        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
            base.OnActivityResult(requestCode, resultCode, data);
            PayCardsRecognizerService.OnActivityResult(requestCode, resultCode, data);

iOS Setup

Add Camera Permission in Info.plist

    <string>This application needs camera access</string>

Now you are ready to to scan credit cards!


  var cardInfo = await CrossPayCards.Current.ScanAsync();
  System.Debug.WriteLine("Result", $"{card.HolderName}\n{card.CardNumber}\n{card.ExpirationDate}","Ok");


Plugin to scan credit card information using Pay.Cards library

Paycardsplugin Info

⭐ Stars 15
🔗 Homepage
🔗 Source Code
🕒 Last Update 10 months ago
🕒 Created a year ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author CrossGeeks