Nimbbl Flutter WebView SDK - Merchant Integration Guide

🎉 Production Ready SDK - Simple Integration!

🚀 Release Announcement

We're excited to announce the release of Nimbbl Flutter WebView SDK v1.1.0! This major update brings:

  • ✅ Simplified Integration: Get started with just 3 lines of code
  • ✅ Production Ready: Battle-tested with thousands of successful transactions
  • ✅ Complete Flutter Support: Full widget implementation examples
  • ✅ Enhanced Error Handling: Better debugging and error management
  • ✅ Improved Performance: Faster initialization and payment processing
  • ✅ Semantic Versioning: Proper version management with alpha/beta releases
  • ✅ iOS WebView Integration: Full integration with iOS WebView SDK v2.0.11

What's New:

  • Streamlined API for easier integration
  • Comprehensive documentation with real-world examples
  • Optimized for Flutter 3.x compatibility
  • Semantic versioning with pre-release support
  • Enhanced iOS WebView SDK integration

Ready to integrate? Let's get started! 🚀

Quick Start (3 Lines of Code)

1. Add Dependency

dependencies:
  nimbbl_mobile_kit_flutter_webview_sdk: ^1.0.11

2. Initialize SDK

await NimbblCheckoutSDK.instance.initialize();

3. Process Payment

final result = await NimbblCheckoutSDK.instance.checkout(
  CheckoutOptions(orderToken: "your_order_token_from_backend")
);

// Handle payment result
if (result['status'] == 'success') {
  print('Payment successful!');
  print('Payment ID: ${result['payment_id']}');
} else if (result['status'] == 'failed') {
  print('Payment failed: ${result['message']}');
} else if (result['status'] == 'cancelled') {
  print('Payment cancelled by user');
}

Complete Integration Example

Here's a complete Flutter widget implementation showing how to integrate the Nimbbl SDK:

import 'package:flutter/material.dart';
import 'package:nimbbl_mobile_kit_flutter_webview_sdk/nimbbl_checkout_sdk.dart';
import 'package:nimbbl_mobile_kit_flutter_webview_sdk/types.dart';

class PaymentScreen extends StatefulWidget {
  @override
  _PaymentScreenState createState() => _PaymentScreenState();
}

class _PaymentScreenState extends State<PaymentScreen> {
  bool _isLoading = false;

  @override
  void initState() {
    super.initState();
    _initializeSDK();
  }

  // Step 1: Initialize SDK
  Future<void> _initializeSDK() async {
    
    // Initialize with default configuration
    await NimbblCheckoutSDK.instance.initialize();
    
  }

  // Step 2: Process Payment
  Future<void> _processPayment() async {
    setState(() => _isLoading = true);

    try {
      final options = CheckoutOptions(
        orderToken: "your_order_token_from_backend",
      );

      final result = await NimbblCheckoutSDK.instance.checkout(options);

      if (result['status'] == 'success') {
        print('Payment successful!');
        print('Payment ID: ${result['payment_id']}');
      } else if (result['status'] == 'failed') {
        print('Payment failed: ${result['message']}');
      }
    } catch (e) {
      print('Error: $e');
    } finally {
      setState(() => _isLoading = false);
    }
  }


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: _isLoading ? null : _processPayment,
          child: _isLoading ? CircularProgressIndicator() : Text('Pay Now'),
        ),
      ),
    );
  }
}

🔄 Version Management

We use semantic versioning with automated version management:

# Create alpha release for testing
./scripts/version_manager.sh alpha

# Create stable release
./scripts/version_manager.sh patch

# Publish to pub.dev
./scripts/version_manager.sh publish

See VERSION_MANAGEMENT.md for complete documentation.

📚 Documentation

Libraries

constants
nimbbl_checkout_sdk
Main Nimbbl SDK for Flutter
nimbbl_mobile_kit_flutter_webview_sdk
Nimbbl Flutter SDK - Merchant Integration Guide
nimbbl_mobile_kit_flutter_webview_sdk_method_channel
Method channel implementation for Nimbbl Flutter SDK
nimbbl_mobile_kit_flutter_webview_sdk_platform_interface
Platform interface for Nimbbl Flutter SDK
types