Skip to content

A Flutter app for experimental integration of the Chapa payment gateway, supporting telebirr, CBEBirr, eBirr, and M-Pesa. Built for testing payment flows in a non-production environment. Includes sample code and setup guide. Not intended for Play Store or App Store distribution.

License

Notifications You must be signed in to change notification settings

abditwayessa/FlutterChapaExp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Chapa Payment Experiment

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.

Features

  • 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).

Prerequisites

  • Flutter SDK (version 3.0.0 or higher)
  • Chapa test API key (get from Chapa Dashboard)
  • Android/iOS emulator or physical device for testing

Setup

  1. Clone the repository:
    git clone https://github.com/abditwayessa/FlutterChapaExp.git
    cd FlutterChapaExp
  2. Install dependencies: Add the following to pubspec.yaml:
    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
    Run:
    flutter pub get
  3. Configure Chapa API key:
    • Create a .env file in the project root:
      CHAPA_API_KEY=your_test_api_key
      
    • Load the key using flutter_dotenv (see example below).
  4. Add permissions (Android):
    • In android/app/src/main/AndroidManifest.xml, add:
      <uses-permission android:name="android.permission.INTERNET" />
  5. Run the app:
    flutter run

Dependencies Used

  • 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.

Notes

  • This is an experimental project; use Chapa’s test environment for all transactions.
  • Secure API keys with flutter_dotenv and exclude .env from version control.
  • Use connectivity_plus to 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.

Contributing

This is an experimental project. Fork and experiment further! Issues and pull requests are welcome.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Flutter app for experimental integration of the Chapa payment gateway, supporting telebirr, CBEBirr, eBirr, and M-Pesa. Built for testing payment flows in a non-production environment. Includes sample code and setup guide. Not intended for Play Store or App Store distribution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published