all_fintech_flutter_sdk 1.1.4 copy "all_fintech_flutter_sdk: ^1.1.4" to clipboard
all_fintech_flutter_sdk: ^1.1.4 copied to clipboard

The most comprehensive Flutter SDK for Nigerian fintech APIs. Integrate Paystack, Flutterwave, Monnify, Opay, and Open Banking with beautiful UI components and enterprise security.

All Fintech Flutter SDK ๐Ÿš€ #

pub package License: MIT Flutter

The most comprehensive Flutter SDK for Nigerian fintech APIs - Integrate payments, banking, and financial services with a single, unified interface.

๐ŸŒŸ Why Choose All Fintech SDK? #

  • ๐ŸŽฏ One SDK, Multiple Providers - Paystack, Flutterwave, Monnify, Opay, Open Banking
  • ๐Ÿ”’ Enterprise Security - OAuth 2.0, signature verification, webhook handling
  • ๐ŸŽจ Beautiful UI Components - Material Design 3 payment sheets and forms
  • โšก Production Ready - Offline support, error handling, circuit breaker patterns
  • ๐Ÿ“ฑ Type Safe - Complete Dart models with null safety
  • ๐Ÿ”„ Dual Architecture - Data-only operations OR UI-enabled components

๐Ÿš€ Quick Start #

Installation #

dependencies:
  all_fintech_flutter_sdk: ^1.0.0

Basic Setup #

import 'package:all_fintech_flutter_sdk/all_fintech_flutter_sdk.dart';

// Initialize SDK
final sdk = AllFintechSDK.initialize(
  provider: FintechProvider.paystack,
  apiKey: 'your-api-key',
  publicKey: 'your-public-key', // Optional for some providers
  isLive: false, // Set to true for production
);

๐Ÿ’ณ Payment Examples #

Paystack Integration #

// Data-only payment
final transaction = await sdk.paystack.data.initializeTransaction(
  TransactionRequest(
    email: 'customer@example.com',
    amount: 50000, // Amount in kobo (โ‚ฆ500.00)
    reference: 'unique-reference-${DateTime.now().millisecondsSinceEpoch}',
  ),
);

// UI-enabled payment sheet
await sdk.paystack.ui.showPaymentSheet(
  context: context,
  email: 'customer@example.com',
  amount: 50000,
  onSuccess: (transaction) {
    print('Payment successful: ${transaction.reference}');
  },
  onError: (error) {
    print('Payment failed: $error');
  },
);

Flutterwave Integration #

// Create customer
final customer = await sdk.flutterwave.data.createCustomer(
  FlutterwaveCustomerRequest(
    email: 'customer@example.com',
    name: 'John Doe',
    phoneNumber: '+2348123456789',
  ),
);

// Process payment
await sdk.flutterwave.ui.showPaymentSheet(
  context: context,
  amount: 25000,
  currency: 'NGN',
  customerEmail: 'customer@example.com',
  onSuccess: (charge) {
    print('Flutterwave payment successful: ${charge.id}');
  },
);

Monnify Integration #

// Initialize Monnify (uses OAuth 2.0)
final monnifySDK = AllFintechSDK.initialize(
  provider: FintechProvider.monnify,
  apiKey: 'your-api-key',
  publicKey: 'your-secret-key',
  isLive: false,
);

// Create reserved account
final account = await monnifySDK.monnify.data.createReservedAccount(
  MonnifyReservedAccountRequest(
    accountReference: 'unique-ref-123',
    accountName: 'John Doe',
    currencyCode: 'NGN',
    contractCode: 'your-contract-code',
    customerEmail: 'john@example.com',
  ),
);

// Show payment sheet
await monnifySDK.monnify.ui.showPaymentSheet(
  context: context,
  amount: 100000,
  customerName: 'John Doe',
  customerEmail: 'john@example.com',
  paymentReference: 'pay-ref-${DateTime.now().millisecondsSinceEpoch}',
  onSuccess: (transaction) {
    print('Monnify payment completed: ${transaction.transactionReference}');
  },
);

๐Ÿ’ฐ TransactPay Integration #

// Initialize TransactPay (uses encrypted communication)
final transactPaySDK = AllFintechSDK.initialize(
  provider: FintechProvider.transactpay,
  apiKey: 'your-api-key',
  publicKey: 'your-encryption-key',
  isLive: false,
);

// Create order
final order = await transactPaySDK.transactpay.data.createOrder(
  TransactPayOrderRequest(
    reference: 'TXN-${DateTime.now().millisecondsSinceEpoch}',
    amount: 75000,
    currency: 'NGN',
    customer: TransactPayCustomer(
      email: 'customer@example.com',
      firstName: 'John',
      lastName: 'Doe',
    ),
    narration: 'Payment for services',
  ),
);

// Show payment sheet with card/bank options
await transactPaySDK.transactpay.ui.showPaymentSheet(
  context: context,
  amount: 75000,
  customerEmail: 'customer@example.com',
  customerFirstName: 'John',
  customerLastName: 'Doe',
  narration: 'Payment for services',
  onSuccess: (response) {
    print('TransactPay payment successful: ${response.reference}');
  },
  onError: (error) {
    print('Payment failed: $error');
  },
);

// Bank transfer payment
await transactPaySDK.transactpay.ui.showBankTransferSheet(
  context: context,
  orderReference: order.reference,
  amount: 75000,
  onSuccess: (response) {
    print('Bank transfer initiated: ${response.reference}');
  },
);

๐Ÿฆ Open Banking Integration #

// Initialize Open Banking
final openBankingSDK = AllFintechSDK.initialize(
  provider: FintechProvider.openBanking,
  apiKey: 'your-client-id',
  publicKey: 'your-client-secret',
  baseUrl: 'https://api.openbanking.ng',
);

// Get customer accounts
final accounts = await openBankingSDK.openBanking.data.getAccounts(
  consentToken: 'customer-consent-token',
);

// Show account selector UI
await openBankingSDK.openBanking.ui.showAccountSelector(
  context: context,
  consentToken: 'customer-consent-token',
  onAccountSelected: (account) {
    print('Selected account: ${account.accountNumber}');
  },
  onError: (error) {
    print('Error: $error');
  },
);

// Get transaction history
final transactions = await openBankingSDK.openBanking.data.getAccountTransactions(
  '0123456789',
  from: '2024-01-01',
  to: '2024-12-31',
  consentToken: 'customer-consent-token',
);

๐ŸŽจ UI Components #

Payment Sheets #

All providers include beautiful, customizable payment sheets:

// Paystack payment sheet
await sdk.paystack.ui.showPaymentSheet(
  context: context,
  email: 'customer@example.com',
  amount: 50000,
  metadata: {'order_id': '12345'},
  onSuccess: (transaction) => handleSuccess(transaction),
  onError: (error) => handleError(error),
);

// Opay payment sheet with channel selection
await sdk.opay.ui.showPaymentSheet(
  context: context,
  amount: 75000,
  orderNr: 'ORDER-${DateTime.now().millisecondsSinceEpoch}',
  redirectUrl: 'https://yourapp.com/success',
  webServiceUrl: 'https://yourapp.com/webhook',
  standard: 'opay_8.1',
  onSuccess: (transaction) => print('Opay success: ${transaction.transactionId}'),
);

Management Dialogs #

// Show transaction status
await sdk.paystack.ui.showTransactionStatusDialog(
  context: context,
  transaction: transaction,
);

// Show customer management
await sdk.flutterwave.ui.showCustomerForm(
  context: context,
  onCustomerCreated: (customer) => print('Customer created: ${customer.id}'),
);

๐Ÿ”ง Advanced Features #

Webhook Handling #

// Verify webhook signatures
final isValid = await sdk.webhooks.processWebhook(
  payload: request.body,
  signature: request.headers['x-paystack-signature'],
);

if (isValid) {
  // Process webhook data
  print('Webhook verified and processed');
}

Offline Support #

// Initialize offline manager
await sdk.initialize();

// Sync offline requests when connection is restored
await sdk.syncOfflineRequests();

Error Handling with Circuit Breaker #

try {
  final transaction = await sdk.paystack.data.initializeTransaction(request);
} on FintechException catch (e) {
  if (e is CircuitBreakerOpenException) {
    // Handle circuit breaker open state
    print('Service temporarily unavailable');
  } else {
    // Handle other fintech errors
    print('Payment error: ${e.message}');
  }
}

๐Ÿ—๏ธ Architecture #

Dual Service Pattern #

Every provider follows a consistent dual architecture:

// Data-only operations (headless)
final result = await sdk.provider.data.someOperation();

// UI-enabled operations (with widgets)
await sdk.provider.ui.showSomeSheet(context: context);

Provider Switching #

// Easy provider switching
FintechProvider currentProvider = FintechProvider.paystack;

switch (currentProvider) {
  case FintechProvider.paystack:
    await sdk.paystack.ui.showPaymentSheet(/* ... */);
    break;
  case FintechProvider.flutterwave:
    await sdk.flutterwave.ui.showPaymentSheet(/* ... */);
    break;
  case FintechProvider.monnify:
    await sdk.monnify.ui.showPaymentSheet(/* ... */);
    break;
}

๐Ÿ“‹ Supported Providers #

Provider Payments Transfers Customers Subscriptions Open Banking
Paystack โœ… โœ… โœ… โœ… โŒ
Flutterwave โœ… โœ… โœ… โœ… โŒ
Monnify โœ… โœ… โŒ โŒ โŒ
Opay โœ… โŒ โŒ โŒ โŒ
TransactPay โœ… โŒ โœ… โŒ โŒ
Open Banking โŒ โŒ โŒ โŒ โœ…

๐Ÿ”’ Security Features #

  • Signature Verification - All API requests are signed and verified
  • OAuth 2.0 - Secure authentication for Open Banking and Monnify
  • Webhook Security - Automatic signature validation for webhooks
  • Token Management - Automatic token refresh and secure storage
  • Encryption - AES-256-CBC encryption for sensitive data

๐Ÿงช Testing #

// Mock responses for testing
final mockSDK = AllFintechSDK.initialize(
  provider: FintechProvider.paystack,
  apiKey: 'test-key',
  isLive: false, // Always use test mode for development
);

// Test payment flow
await mockSDK.paystack.data.initializeTransaction(
  TransactionRequest(
    email: 'test@example.com',
    amount: 100000,
    reference: 'test-ref-123',
  ),
);

๐Ÿ“š Documentation #

๐Ÿ› Bug Reports & Feature Requests #

Found a bug or have a feature request? We'd love to hear from you!

๐Ÿ” Reporting Bugs #

Report a Bug โ†’

Before reporting:

  • Check existing issues
  • Include provider name, Flutter version, and error details
  • Provide minimal code example to reproduce

โœจ Feature Requests #

Request a Feature โ†’

Popular requests:

  • New fintech provider integrations
  • Additional UI components
  • Enhanced security features
  • Performance improvements

๐Ÿค Contributing #

We welcome contributions from the community! Here's how you can help:

Quick Start Contributing #

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/your-username/all_fintech_sdk.git
  3. Create a branch: git checkout -b feature/your-feature-name
  4. Make your changes following our coding standards
  5. Test your changes thoroughly
  6. Submit a pull request

Contribution Areas #

  • ๐Ÿฆ New Providers - Add support for more Nigerian fintech APIs
  • ๐ŸŽจ UI Components - Enhance existing or create new Material Design widgets
  • ๐Ÿ”’ Security - Improve authentication and encryption features
  • ๐Ÿ“š Documentation - Help improve guides and examples
  • ๐Ÿงช Testing - Add unit tests and integration tests
  • ๐Ÿ› Bug Fixes - Fix issues and improve stability

Development Setup #

# Clone the repository
git clone https://github.com/chidiebere-edeh/all_fintech_sdk.git
cd all_fintech_sdk/flutter-sdk/all_fintech_flutter_sdk

# Install dependencies
flutter pub get

# Run tests
flutter test

# Run example app
cd example
flutter run

Coding Standards #

  • Follow Dart/Flutter best practices
  • Maintain the minimal code principle
  • Add documentation for public APIs
  • Include tests for new features
  • Use conventional commit messages

Pull Request Guidelines #

  • Clear title describing the change
  • Detailed description of what was changed and why
  • Link related issues using Fixes #123 or Closes #123
  • Test coverage for new functionality
  • Documentation updates if needed

View Contributing Guide โ†’

๐Ÿ“„ License #

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

๐Ÿ‘จโ€๐Ÿ’ป Author #

Chidiebere Edeh

๐Ÿ™ Acknowledgments #

  • Nigerian fintech ecosystem for driving innovation
  • Flutter community for excellent tooling and support
  • All contributors who helped make this SDK possible

โญ Show Your Support #

If this SDK helped you build amazing fintech applications, please give it a โญ on GitHub!


Built with โค๏ธ for the Nigerian fintech ecosystem by Chidiebere Edeh

1
likes
65
points
195
downloads

Publisher

unverified uploader

Weekly Downloads

The most comprehensive Flutter SDK for Nigerian fintech APIs. Integrate Paystack, Flutterwave, Monnify, Opay, and Open Banking with beautiful UI components and enterprise security.

Topics

#fintech #payments #nigeria #banking #flutter

Documentation

API reference

License

MIT (license)

Dependencies

crypto, flutter, http, json_annotation, path_provider

More

Packages that depend on all_fintech_flutter_sdk