cloudcard_flutter 0.0.1 copy "cloudcard_flutter: ^0.0.1" to clipboard
cloudcard_flutter: ^0.0.1 copied to clipboard

Flutter SDK for card digitization and provisioning with Sudo

CloudCard Flutter #

A Flutter plugin for Sudo's CloudCard digital wallet API, enabling seamless digital card operations and contactless payments.

pub package

Overview #

CloudCard Flutter provides an interface for managing digital cards, including provisioning, management, and transactions. It wraps Sudo Africa's CloudCard API to offer a comprehensive solution for card lifecycle management, tokenization, and payment operations in your Flutter applications.

Installation #

1. Add the package to your pubspec.yaml #

dependencies:
  cloudcard_flutter: ^1.0.0

2. Configure Repository Access #

This package requires access credentials from Sudo Africa. Add the following to your pubspec.yaml:

dependency_overrides:
  cloudcard_flutter:
    hosted:
      name: cloudcard_flutter
      url: https://sdk.sudo.africa/repository/maven-releases
      username: YOUR_USERNAME
      password: YOUR_PASSWORD

Replace YOUR_USERNAME and YOUR_PASSWORD with the credentials provided by Sudo Africa.

Getting Started #

Initialize the SDK #

Before using any features, initialize the SDK in your app's startup:

import 'package:cloudcard_flutter/cloudcard_flutter.dart';

Future<void> initializeCloudCard() async {
  // Use true for sandbox, false for production
  await CloudCardFlutter().init(isSandBox: true);
}

Sandbox vs Production #

  • Sandbox Mode: Use for development and testing (set isSandBox: true)
  • Production Mode: Use for live applications (set isSandBox: false)

Core Features #

Register a Card #

Card registration data is retrieved after completing onboarding on the Sudo Africa platform.

final registrationData = RegistrationData(
  walletId: 'wallet-id-from-sudo',
  paymentAppInstanceId: 'payment-app-instance-id',
  accountId: 'account-id',
  secret: 'secret-key',
  // Optional fields
  jwtToken: 'jwt-token-from-sudo',
  cardNumber: '4111111111111111',
  expiryDate: '12/25',
  cardHolderName: 'John Doe',
);


final result = await CloudCardFlutter().registerCard(registrationData);
if (result.success) {
  // Card successfully registered
}

Get Cards #

Retrieve all registered cards associated with the current user:

final cards = await CloudCardFlutter().getCards();
for (var card in cards) {
  print('Card ID: ${card.id}, Last 4: ${card.last4}, Network: ${card.network}');
}

Generate EMV QR Code #

Create a one-time use customer-presented QR code that can be used to make payments on terminals as a physical card would:

final result = await CloudCardFlutter().getEmvQr(
  cardId: 'card-id-here',
  amount: '1000.00', // Optional, omit for dynamic amount
);

if (result.success && result.data != null) {
  final qrCodeData = result.data!['qrCode'];
  // Display QR code to user for payment
}

Additional Features #

  • NFC Operations: Check NFC availability and set up payment defaults
  • Card Management: Freeze/unfreeze cards, delete cards
  • Security: Manage authentication requirements and key replenishment
  • Token Management: Get token usage summaries and thresholds

Transaction Processing #

For transaction processing functionality, please use the companion library flutter_tappa.

Requirements #

  • Flutter 2.5.0 or higher
  • iOS 12.0+ / Android API level 21+
  • NFC-enabled device for NFC contactless payments (Not required for QR payments)

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Support #

For support, please contact [email protected] or visit sudo.africa.

2
likes
0
points
211
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for card digitization and provisioning with Sudo

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on cloudcard_flutter

Packages that implement cloudcard_flutter