A Flutter app for experimenting with Chapa payment gateway integration, supporting payment methods like telebirr, CBEBirr, eBirr, and M-Pesa. Built for testing payment flows in a non-production environment. This project is for experimental purposes only and not intended for Play Store or App Store distribution.
- Initiates payments using Chapa's Flutter SDK in test mode.
- Supports Ethiopian payment methods (telebirr, CBEBirr, eBirr, M-Pesa).
- Includes network connectivity checks and URL launching for payment flows.
- Features animated text for enhanced UI (optional).
- Flutter SDK (version 3.0.0 or higher)
- Chapa test API key (get from Chapa Dashboard)
- Android/iOS emulator or physical device for testing
- Clone the repository:
git clone https://github.com/abditwayessa/FlutterChapaExp.git cd FlutterChapaExp - Install dependencies:
Add the following to
pubspec.yaml:Run:dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 animated_text_kit: ^4.2.2 get: ^4.6.6 http: ^1.2.0 rename_app: ^1.6.1 connectivity_plus: ^6.0.5 url_launcher: ^6.2.5 flutter_dotenv: ^5.0.0 # For managing API keys
flutter pub get
- Configure Chapa API key:
- Create a
.envfile in the project root:CHAPA_API_KEY=your_test_api_key - Load the key using
flutter_dotenv(see example below).
- Create a
- Add permissions (Android):
- In
android/app/src/main/AndroidManifest.xml, add:<uses-permission android:name="android.permission.INTERNET" />
- In
- Run the app:
flutter run
cupertino_icons: ^1.0.2- iOS-style icons.animated_text_kit: ^4.2.2- Animated text for UI effects.get: ^4.6.6- State management and navigation.http: ^1.2.0- HTTP requests for backend communication.rename_app: ^1.6.1- App renaming utility.connectivity_plus: ^6.0.5- Network connectivity checks.url_launcher: ^6.2.5- Opens Chapa payment URLs.flutter_dotenv: ^5.0.0- Environment variable management.
- This is an experimental project; use Chapa’s test environment for all transactions.
- Secure API keys with
flutter_dotenvand exclude.envfrom version control. - Use
connectivity_plusto ensure network availability before payments. - Verify payments on your backend for production use (not included here).
- Refer to Chapa Documentation for test keys and API details.
This is an experimental project. Fork and experiment further! Issues and pull requests are welcome.
This project is licensed under the MIT License. See the LICENSE file for details.