Skip to Content
DocumentationIntroduction

MindPaystack Logo

MindPaystack

The Dart-First Paystack SDK

Built from the ground up for Dart and Flutter developers, MindPaystack delivers a production-ready payment integration with clean architecture, type safety, and dependency injection out of the box.


Why Dart-First Matters

MindPaystack is a Dart-first SDK, built from the ground up to align with Dart’s ecosystem and development principles.

  • Pure Dart Core → Framework-agnostic foundation that works everywhere Dart runs
  • Flutter-Native → Dedicated Flutter layer with UI components and platform integrations
  • Pub.dev Ready → Follows Dart package conventions and best practices
  • Null Safety → Built with sound null safety from day one
  • Async/Await Native → Leverages Dart’s async model for clean, readable code

Architecture: Dart Ecosystem at its Best

MindPaystack embraces the Dart way of building scalable applications:

Modular Package Design

  • mind_paystack → Pure Dart core for universal compatibility
  • mind_paystack_flutter → Flutter-specific widgets and integrations (Coming Soon)
  • Future packages → Planned Web, Server, and CLI variants

Clean Architecture Pattern

// Singleton pattern with dependency injection await MindPaystack.initialize(PaystackConfig( publicKey: 'pk_test_your_key', secretKey: 'sk_test_your_key', )); // Service-oriented access final sdk = MindPaystack.instance; final transaction = await sdk.transaction.initialize(request); final verification = await sdk.transaction.verify(reference);

Injectable & GetIt Integration

Built with injectable for seamless dependency injection:

@injectable class TransactionService implements ITransactionService { // Fully testable and mockable services }

Dart-Centric Developer Experience

Strongly Typed Everything

// No dynamic types - full IDE support final TransactionInitialization result = await sdk.transaction.initialize( InitializeTransactionOptions( email: 'user@example.com', amount: Money.fromCents(50000, Currency.ngn), ), );

Test-First Design

Built with Dart testing patterns in mind:

// Easy to mock with mocktail/mockito final mockService = MockTransactionService(); when(() => mockService.initialize(any())).thenAnswer((_) async => result);

Freezed & Code Generation

Leverages Dart’s powerful code generation:

  • Freezed for immutable data classes
  • Json Serialization for API models
  • Injectable for dependency injection setup

Platform Coverage: Pure Dart Flexibility

PlatformSupportPackage
Flutter MobileComing Soonmind_paystack_flutter
Flutter WebAvailablemind_paystack
Dart VMAvailablemind_paystack
Flutter DesktopAvailablemind_paystack

Built for Dart Developers, By Dart Developers

Enterprise-Ready Features:

  • Dio HTTP Client → Interceptors, retries, and request/response logging
  • Logger Integration → Structured logging with configurable levels
  • Exception HierarchyMindException with detailed error categorization
  • Environment Config → Support for .env files and environment variables
  • Value ObjectsMoney, Currency types for financial safety

Dart Ecosystem Integration:

  • Very Good Analysis → Strict linting rules for code quality
  • Mason Templates → Scaffolding support (coming soon)
  • Flutter Dev Tools → Network inspection and debugging support

When to Choose MindPaystack

✅ Perfect For:

  • Flutter Apps → Native mobile payment experiences
  • Dart Backend → Server-side payment processing and webhooks
  • Full-Stack Dart → Shared payment logic across client and server
  • Enterprise Apps → Type-safe, testable, maintainable payment integrations

💡 Why It Stands Out: Unlike generic HTTP clients or thin API wrappers, MindPaystack is built specifically for how Dart and Flutter developers work. It follows Dart conventions, embraces the type system, and integrates seamlessly with the broader Dart ecosystem.

Whether you’re building a Flutter fintech app, a Dart microservice, or a full-stack Dart application, MindPaystack provides the foundation you need to handle payments reliably and maintainably.


Current Status & Roadmap

Available Now

  • Transaction Management → Initialize, verify, list transactions
  • Type-Safe Money Handling → Money and Currency value objects
  • Error Handling → Comprehensive MindException system
  • Dependency Injection → Injectable support for testing
  • Pure Dart Support → CLI tools, server apps, Dart web

Coming Soon

  • Charge Operations → Direct card charging and tokenization
  • Payment Channels → Available payment methods management
  • Payment Methods → Customer payment method storage
  • Flutter Package → UI widgets and platform integration
  • Webhooks → Event handling and verification

Future Releases

  • Subscriptions → Recurring billing management
  • Advanced Analytics → Transaction insights and reporting
  • Multi-tenant Support → Organization-level configurations
  • Enhanced Security → Additional fraud prevention tools
Last updated on