Flutter-v3
Flutterwave for Business (F4B) v3 API 用の Flutter ライブラリ。
- スター
- 3
- フォーク
- 3
- 最終プッシュ(UTC)
- 2025/10/23
- プロジェクト状態
- 公開中
元の README
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
Flutterwave Flutter SDK (Standard)
The Flutter library helps you create seamless payment experiences in your dart mobile app. By connecting to our modal, you can start collecting payment in no time.
Available features include:
- Collections: Card, Account, Mobile money, Bank Transfers, USSD.
- Recurring payments: Tokenization and Subscriptions.
- Split payments.
Table of Contents
Requirements
- Flutterwave for business API Keys
- Supported Flutter version >= 1.17.0
- Dart SDK >= 2.17.0
- For Android development, ensure the NDK version >=
27.0.12077973on your project'sandroid/app/build.gradle.ktsfile with android{ ndkVersion = "27.0.12077973" }.
Installation
- Add the dependency to your project. In your
pubspec.yamlfile add:flutterwave_standard: 1.1.0 - Run
flutter pub get.
Usage
Initializing a Flutterwave instance
To create an instance, you should call the Flutterwave constructor. This constructor accepts a mandatory instance of the following:
publicKeyCustomeramountemailfullNametxRefisTestModepaymentOptionsredirectUrlCustomization
It returns an instance of Flutterwave which we then call the async method .charge() on.
_
handlePaymentInitialization() async {
final Customer customer = Customer(
name: "Flutterwave Developer",
phoneNumber: "1234566677777",
email: "customer@customer.com"
);
final Flutterwave flutterwave = Flutterwave(
publicKey: "Public Key-here",
currency: "currency-here",
redirectUrl: "add-your-redirect-url-here",
txRef: "add-your-unique-reference-here",
amount: "3000",
customer: customer,
paymentOptions: "ussd, card, bank transfer",
customization: Customization(title: "My Payment"),
isTestMode: true );
final ChargeResponse response = await flutterwave.charge(context);
// Handle the response
if (response.success == true) {
// Payment was successful
} else {
// Payment failed or was cancelled
}
}
Handling the response
Calling the .charge() method returns a Future of ChargeResponse which we await for the actual response as seen above.
final ChargeResponse response = await flutterwave.charge(context);
Call the verify transaction endpoint with the transactionID returned in response.transactionId or the txRef you provided to verify transaction before offering value to customer
Note
ChargeResponsecan be null, depending on if the user cancels the transaction by pressing back.- You need to confirm the transaction status is successful. Ensure that the txRef, amount, and status are correct and successful. Be sure to verify the transaction details before providing value.
- Some payment methods are not instant, such a
Pay with Bank Transfers, Pay with Bank, and so you would need to rely on webhooks or call the transaction verification service using thetransactionId, or transaction reference you created(txRef) - For such long payments like the above, closing the payment page returns a
cancelledstatus, so your final source of truth has to be calling the transaction verification service.
Support
For additional assistance using this library, contact the developer experience (DX) team via [email](mailto:developers@flutterwavego.com) or on slack.
You can also follow us @FlutterwaveEng and let us know what you think 😊.
Contribution guidelines
Read more about our community contribution guidelines here.
License
By contributing to the Flutter library, you agree that your contributions will be licensed under its MIT license.
Copyright (c) Flutterwave Inc.
Built Using
Other Resources
カテゴリー
使用している依存関係
依存関係一覧 6 件
- flutter
{"sdk":"flutter"} - http
^1.3.0 - fluttertoast
^8.2.12 - flutter_inappwebview
^6.1.5 - flutter_test開発用
{"sdk":"flutter"} - mockito開発用
^5.0.15
プロジェクトに合うリポジトリを選ぶには?
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
- 名前・作者・説明で検索し、技術トピックで絞り込みます。
- スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
- 利用前に GitHub で README、ライセンス、Issues を確認します。
情報源と管理
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗