A Flutter plugin integrating the official android and ios SDK for Mono (financial data Platform) (https://mono.co/)
Features
- Mono Connect ✅
- One-Time Debit ✅
- Recurring Debit ❌ (coming soon)
Usage
Mono Connect
To use the mono connect widget import 'package:flutter_mono_widget/flutter_mono_widget.dart' and use the methods in FlutterMonoConnectWidget class.
Example
TextButton(
onPressed: () async {
final String? code = await Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => FlutterMonoConnectWidget(apiKey: _apiKey),
),
);
debugPrint('code is : $code');
},
child: const Text('connect Widget'),
),
One-Time Debit
To use the mono connect widget import 'package:flutter_mono_widget/flutter_mono_widget.dart' and use the methods in FlutterMonoPaymentWidget class.
Example
TextButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => FlutterMonoPaymentWidget(
apiKey: _apiKey,
amountInKobo: 200 * 100, // amount in kobo
description: 'Testing payments',
reference:
'${DateTime.now().microsecondsSinceEpoch}_reference_123',
transactionReference:
'${DateTime.now().microsecondsSinceEpoch}_transactionReference_123',
onSuccess: (Map<String, dynamic>? data) {
log('data response: $data');
},
),
),
);
},
child: const Text('One Time Payment'),
),
Note: both reference and transactionReference must be unique for every transaction
checkout the example project for full implementation