Package
- SDK:
cloudcard_flutter - Version: 0.1.1 (pub.dev/packages/cloudcard_flutter)
For terminal transaction processing, Flutter has a companion package: flutter_tappa.
Installation
Add the dependency:Android Repository Setup
For Gradle < 7 (android/build.gradle):
android/settings.gradle):
gradle.properties:
Android Manifest Configuration
Register the HCE service and receiver inside<application> in android/app/src/main/AndroidManifest.xml.
android/app/src/main/res/xml/apduservice.xml:
iOS Setup
Create.env in your project root:
Initialization
Initialize once near app startup.isSandBox: truefor sandboxisSandBox: falsefor production
Health Checks
Optional Security Behavior
setRequireAuth(true) if you want foreground access and biometric checks during payment access.
Register Card
You register cards withRegistrationData.
Required fields:
walletIdpaymentAppInstanceIdaccountIdjwtToken
secretcardNumberexpiryDatecardHolderName
Digitalization Fetch Pattern
If you already have your own card-management system, you can build and pass your ownRegistrationData directly to registerCard using the required fields walletId, paymentAppInstanceId, accountId, and jwtToken.
If you do not manage that payload yourself, fetch the onboarding or digitalization payload from your backend first, then pass it to registerCard. For endpoint details, see Card Digitalization Reference.
Card Management
Get Cards
Freeze or Unfreeze
isFreeze: false to unfreeze.
Delete Card
Wipe Wallet
Manual Key Replenishment
Token Usage Summary
QR and Transactions
Generate EMV QR
amount is in the smallest unit and typically zero-padded.
Read Saved Transactions
getSavedTransactions() returns recent cached transactions, up to 5.
NFC and Settings
NFC Chip Indicator Helpers
Requirements
- Flutter 2.5.0+
- Android API 21+
- iOS 13.0+
Troubleshooting
Initialization Fails
- Confirm SDK repository credentials are set correctly on Android.
- Confirm the iOS
.netrcauth step was completed beforepod install. - Check that you called
init()before card operations.
NFC Not Working
- Confirm the device supports NFC.
- Confirm NFC is enabled in system settings.
- Confirm your app is set as default payment app when required.
- Verify the HCE service and receiver entries in
AndroidManifest.xml. - Confirm the receiver class is
africa.sudo.cloudcard_flutter.HceEventReceiver.
Card Registration Fails
- Verify
walletId,paymentAppInstanceId,accountId, andjwtToken. - Ensure the onboarding token is still valid.
- Check that your backend is issuing tokens for the correct environment.
QR Generation Fails
- Use a valid
cardId. - Ensure
amountis formatted correctly.
Empty Transaction List
getSavedTransactions()uses local cache and returns recent transactions only.- Complete at least one transaction flow first, then reload.
