Overview
The Cloud Card Android SDK provides APIs for:- Card provisioning and registration
- Card management
- QR-based transactions
- Token usage summaries
- NFC and payment-app status checks
Installation
Add the SDK repository and dependency to your Android app module setup.Android Manifest
Add the following service inside the<application> tag of your AndroidManifest.xml.
Initialization
Import the SDK and initialize it before using any Cloud Card API.API Reference
isNfcEnabled()
Returns Boolean.
Use this to determine whether NFC is available and enabled on the device.
isDeviceSupported()
Returns Boolean.
Use this to verify whether the current device meets the required security and compatibility checks.
isDefaultPaymentApp()
Returns Boolean.
Use this to determine whether your application is currently set as the default payment app.
registerCard(data: RegistrationData)
manualKeyReplenishment()
freezeUnfreezeCard(period: Duration?, cardId: String)
period: optional time-based state inputcardId: required card identifier
CCResult whose data field is a Boolean representing the latest card state.
getCards()
getEmvQr(cardId: String, amount: String? = "000000000000")
amount: optional 12-character amount in the lowest denomination. For example, NGN 1 should be passed as"000000000100".cardId: required card identifier
CCResult whose data field contains a Bitmap.
tokenSummary()
setRequireAuth(auth: Boolean)
Objects
RegistrationData
Required fields:
walletId: institution IDpaymentAppInstanceId: unique device IDaccountId: card unique identifierjwtToken: auth token from your server
secret: secret passed to the usercardNumber: card number for an already-issued cardexpiryDate: expiry for an already-issued cardcardHolderName: cardholder name for an already-issued card
CCResult
Fields:
status: request status. Possible values areSUCCESS,FAILED,PENDINGmessage: accompanying messagedata: present on successful responses
CardData
Fields:
isActive: current card state.falsemeans the card is frozenid: unique card IDmaskedPan: masked PANcardHolder: cardholder nameexp: card expiry data
Customization
APDU Service Banner
To override the default Host APDU Service banner used by the library, add a drawable resource with the same name in your application:- Create
cloud_card_bannerin your app’sres/drawabledirectory.
