fundlypay 0.0.3
fundlypay: ^0.0.3 copied to clipboard
A Flutter library by Fundly Pay for seamless and standardized payment integration across multiple payment methods — simplifying invoice collection, reconciliation, and settlement.
🏦 FundlyPay #
A Flutter library by Fundly Pay for seamless and standardized payment integration.
It enables effortless management of invoice-based and direct payment lifecycles while maintaining a clear separation between system transaction statuses and manual distributor settlements.
This ensures transparent payment tracking, reconciliation, and settlement across multiple payment methods such as Cash, Cheque, Static QR, Dynamic QR, Payment Link, and Fundly Pay.
🚀 Features #
✅ Seamless integration for Fundly Pay transactions
✅ Supports both Invoice Collect and Direct Collect payment flows
✅ Easy environment configuration (Sandbox / Production)
✅ Event-driven architecture for handling HOME and CLOSE actions
✅ Secure authentication via credential object (API Key or Username/Password)
✅ Standardized and extensible payment object structure
⚙️ Getting Started #
1️⃣ Installation #
Add the dependency to your pubspec.yaml:
dependencies:
fundlypay: ^0.0.2
Then run:
flutter pub get
2️⃣ Import #
import 'package:fundlypay/fundlypay.dart';
🧠 Inputs to Library #
1. Credentials #
Option 1 — Username/Password
"credential": {
"username": "demo_user",
"password": "dummy_password_123",
"source": "SOURCE_APP"
}
Option 2 — API Key
"credential": {
"apiKey": "dummy_api_key_123",
"source": "SOURCE_APP"
}
2. Payment Details #
💰 Invoice Collect
"paymentDetails": {
"distributorId": "DISTRIBUTOR1234",
"chemistId": "CHEMIST1234",
"paymentType": "INVOICE_COLLECT",
"payableAmount": 200.0,
"invoice": [
{
"invoiceNumber": "INV1001",
"paidAmount": 500.0,
"invoiceYear": "2025" // Optional: Invoice year in YYYY format
},
{
"invoiceNumber": "INV1002",
"paidAmount": 500.0,
"invoiceYear": "2025" // Optional
}
]
}
Invoice Object Parameters:
invoiceNumber(required): Invoice identifierpaidAmount(required): Amount paid for this invoiceinvoiceYear(optional): Invoice year in YYYY format
💳 Direct Collect
"paymentDetails": {
"distributorId": "DISTRIBUTOR1234",
"chemistId": "CHEMIST1234",
"paymentType": "DIRECT_COLLECT",
"payableAmount": 200.0,
"invoices": [
{
"invoiceId": "INV101",
"invoice": [
{
"page": "1",
"url": "https://example.com/invoice_page1.jpg"
},
{
"page": "2",
"url": "https://example.com/invoice_page2.jpg"
}
]
},
{
"invoiceId": "INV102",
"invoice": [
{
"page": "1",
"url": "https://example.com/invoice_page1.jpg"
}
]
}
]
}
🧩 Enums #
enum FundlyPayEvent {
HOME,
CLOSE,
}
enum PaymentType {
DIRECT_COLLECT,
INVOICE_COLLECT,
}
enum FundlyPayEnvironment {
PRODUCTION,
SANDBOX,
}
🧱 Initialization Example #
final fundlyPayObject = {
"credential": credential,
"paymentDetails": paymentDetails,
};
FundlyPayService(
fundlyPayObject: fundlyPayObject,
environment: FundlyPayEnvironment.PRODUCTION,
onEvent: (event, data) {
debugPrint("FundlyPayService Event: $event -> $data");
if (event == FundlyPayEvent.HOME) {
// Example: Navigator.of(context).popUntil((route) => route.isFirst);
} else if (event == FundlyPayEvent.CLOSE) {
// Example: if (Navigator.of(context).canPop()) Navigator.of(context).pop();
}
},
);
🧾 Example: Combined Object #
final fundlyPayObject = {
"credential": {
"username": "demo_user",
"password": "dummy_password_123",
"source": "SOURCE_APP",
},
"paymentDetails": {
"distributorId": "D00000000XX",
"chemistId": "R00000000YY",
"paymentType": "INVOICE_COLLECT",
"payableAmount": 1000.0,
"invoice": [
{
"invoiceNumber": "INV1001",
"paidAmount": 600.0,
"invoiceYear": "2025" // Optional parameter
},
{
"invoiceNumber": "INV1002",
"paidAmount": 400.0,
"invoiceYear": "2025" // Optional parameter
}
]
}
};
🧭 Objective #
The Fundly Pay Flutter Library standardizes the payment lifecycle for invoice and direct collections, ensuring consistent handling of:
- Transaction creation and tracking
- System vs. manual settlement status separation
- Unified reconciliation across multiple payment methods
🧩 Supporting Libraries #
The FundlyPay Flutter Library is built using the following supporting packages:
| Library | Purpose |
|---|---|
flutter_inappwebview |
Embeds and manages Fundly Pay's web-based payment flows securely inside Flutter apps. |
file_picker |
Enables users to select and upload invoice or proof-of-payment files. |
image_picker |
Captures or selects images for document uploads or invoice attachments. |
flutter_image_compress |
Optimizes and compresses images before upload to reduce file size and improve performance. |
path_provider |
Manages local directories for caching and file storage. |
permission_handler |
Handles runtime permissions for file, storage, and media access. |
share_plus |
Allows sharing of receipts, payment links, and transaction data. |
http |
Facilitates secure REST API communication with Fundly Pay backend services. |
🪪 License #
Copyright © 2025 Ardour Analytics Private Limited.
All rights reserved.
This software and its source code are the property of Ardour Analytics Private Limited.
Unauthorized copying, distribution, modification, or use of this software, in whole or in part,
is strictly prohibited without prior written permission from Ardour Analytics Private Limited.
This project is proprietary and maintained by Ardour Analytics Private Limited.
💬 Support #
For integration or technical assistance:
📧 connect@fundly.ai
🌐 www.fundly.ai