Paymob Flutter SDK

pub package License: MIT Creator

A comprehensive Flutter plugin for integrating Paymob payment gateway with native Android and iOS SDK support. Accept payments seamlessly and securely in your Flutter applications with full customization support.

✨ Features

  • πŸš€ Easy Integration - Simple API with minimal setup required
  • πŸ“± Native SDKs - Uses official Paymob Android and iOS SDKs under the hood
  • 🎨 Customizable UI - Customize button colors, app name, and more
  • πŸ’³ Save Card Feature - Optional card saving functionality
  • πŸ”’ Secure Payments - Industry-standard security with PCI compliance
  • βœ… Type-Safe Results - Strongly typed payment result handling
  • 🌍 Multi-Currency - Support for multiple currencies (EGP, USD, etc.)
  • πŸ“Š Comprehensive Error Handling - Clear error messages and states
  • πŸ”„ Null Safety - Fully migrated to null-safe Dart
  • πŸ›‘οΈ Backend Security Mode - Optional secure backend integration to protect your secret keys

πŸ“– Documentation

For installation instructions, full usage examples, API reference, and troubleshooting, see the Example & API Docs.

🎯 Supported Platforms

Platform Minimum Version Status
Android API 23 (6.0) βœ… Supported
iOS 13.0 βœ… Supported

πŸ” Getting Your Paymob Credentials

  1. Sign up at Paymob Dashboard
  2. Get your API keys:
    • Public Key: egy_pk_test_...
    • Secret Key: egy_sk_test_...
  3. Get Integration ID:
    • Go to Settings β†’ Payment Integrations
    • Copy your integration ID

Test Mode

  • No real money is charged in test mode
  • For testing, use test credentials:
Type Number / PIN Expiry CVV OTP
Card 5123 4567 8901 2346 12/30 123 -
Wallet 01010101010 - - 123456

Production Mode

  1. Switch to live API keys
  2. Use live integration IDs
  3. Complete Paymob verification process
  4. Always use secure mode (useSecureMode: true)

🌍 Supported Currencies

The plugin supports multiple currencies including:

  • EGP (Egyptian Pound)
  • USD (US Dollar)
  • SAR (Saudi Riyal)
  • AED (UAE Dirham)
  • And more...

Refer back to Paymob documentation for the complete list.

πŸ“± Platform-Specific Notes

Android

  • The plugin uses Paymob Android SDK 1.6.9
  • Supports Android 6.0 (API 23) and above
  • Works with AndroidX

iOS

  • The plugin uses PaymobSDK 1.0.20
  • Supports iOS 13.0 and above
  • Requires Swift 5.0+

πŸ“„ License

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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ž Support

πŸ™ Acknowledgments

  • Paymob for providing the payment gateway service
  • The Flutter team for the amazing framework
  • All contributors who help improve this package

Special Thanks to Mahmoud ElShennawy For The Continuous Support And Mentorship.

πŸ“ˆ Changelog

See CHANGELOG.md for a list of changes.

Made with ❀️ by Moataz Medhat Yusuf
πŸ”— LinkedIn
πŸ’» GitHub

Star ⭐ this repo if you find it useful!

Libraries

flutter_paymob_sdk