Orientação gerada a partir de informações públicas. Apenas para referência.
O Razorpay Web é um plugin Flutter que integra o SDK de pagamento Razorpay em múltiplas plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux. Ele permite que desenvolvedores implementem processamento de pagamentos seguro e contínuo em seus aplicativos Flutter. O plugin suporta vários métodos de pagamento, como cartões, UPI, bancos online e carteiras, garantindo acessibilidade ampla para os usuários. Com uma API consistente entre plataformas, simplifica a implementação de pagamentos multiplataforma. O código-fonte está disponível publicamente no GitHub para transparência e personalização.
Casos de uso
Compras no aplicativo
Checkout de comércio eletrônico
Faturamento de assinatura
Ticketing de evento
Coleta de doações
Principais recursos
Suporte multiplataforma
Processamento de pagamento seguro
Múltiplos métodos de pagamento
API consistente
Código-fonte aberto
Indicado para
Aplicativos Flutter que exigem pagamentos
Desenvolvedores direcionados para múltiplas plataformas
Empresas com clientes globais
Startups construindo aplicativos de comércio eletrônico
Aplicativos que precisam de pagamentos por UPI e cartão
Considerações
Requer configuração da conta Razorpay
A plataforma web precisa de uma configuração SSL adequada
O tratamento de pagamento deve cumprir as regulamentações locais
Limitado aos países suportados pelo Razorpay
Precisa lidar com callbacks de sucesso/falha de pagamento
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
🔒 Production Ready - Built on official Razorpay SDKs for mobile platforms
🪟 Native Windows Support - Seamless WebView integration with InAppWebView
🧪 Test Mode - Full sandbox environment support for development
📱 External Wallets - Support for Paytm, PhonePe, Google Pay, and more
⚡ Zero Configuration - Works out of the box with minimal setup
☕ Support the Development
🏆 Help Keep This Project Alive & Thriving
As a full-time developer working on this plugin in my limited spare time, your support means the world! Every contribution helps me dedicate more hours to:
✨ Adding new features • 🐛 Fixing bugs faster • 📚 Improving documentation • 🚀 Supporting new platforms
🌟 If this plugin saved you hours of work, consider buying me a chai!
Your support directly impacts how much time I can invest in making this plugin better for everyone.
Use Test Keys for development (no real transactions)
Switch to Live Keys for production
💡 New to Razorpay? Learn about the payment flow before integrating.
📦 Installation
Add razorpay_web to your pubspec.yaml:
dependencies:razorpay_web:^3.1.1
Then run:
flutter pub get
Platform-Specific Setup
🤖 Android Setup
Minimum Requirements
Min SDK Version: 19 (Android 4.4+)
Update android/app/build.gradle:
android {
defaultConfig {
minSdkVersion 19 // Ensure this is at least 19
}
}
ProGuard Rules (if using)
Add to your ProGuard configuration:
-keepattributes *Annotation*
-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}
-optimizations !method/inlining/
-keepclasseswithmembers class * {
public void onPayment*(...);
}
🍎 iOS Setup
Minimum Requirements
Min Deployment Target: iOS 10.0
Bitcode: Enabled
Update ios/Podfile:
platform :ios, '10.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'YES'
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
Add use_frameworks! if you encounter Swift header issues:
use_frameworks!
Then run:
cd ios && pod install
🌐 Web Setup
Add the Razorpay checkout script to web/index.html inside the <body> tag:
<body><!-- Other content --><scriptsrc="https://checkout.razorpay.com/v1/checkout.js"></script><scriptsrc="main.dart.js"type="application/javascript"></script></body>
🪟 Windows Setup
Requirements
Microsoft Edge WebView2 Runtime (pre-installed on Windows 10/11)
No additional configuration needed! The plugin uses flutter_inappwebview to provide a native-like payment experience.
⚠️ Important: You must pass context parameter when calling open() on Windows.
🐧 Linux Setup
Uses the same WebView implementation as Windows. No additional setup required.
🍏 macOS Setup
Requirements
Uses the same WebView implementation as Windows.
Entitlements Configuration
Add network client permission to your entitlements files:
voidmakeOrderPayment() {
// First, create an order on your backend// Then use the order_id in optionsvar options = {
'key': 'rzp_test_1DP5mmOlF5G5ag',
'amount': 50000,
'name': 'Product Name',
'order_id': 'order_xyz123', // Order ID from backend'prefill': {
'contact': '9876543210',
'email': 'customer@example.com'
}
};
_razorpay.open(options, context: context);
}
Contributions are welcome! Here's how you can help:
Reporting Issues
Check existing issues before creating a new one
Provide detailed reproduction steps
Include platform information (OS, Flutter version, plugin version)
Share relevant code snippets and error messages
Pull Requests
Fork the repository
Create a feature branch (git checkout -b feature/amazing-feature)
Make your changes
Add tests for new functionality
Ensure all tests pass (flutter test)
Run code analysis (flutter analyze)
Format your code (dart format .)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
Development Setup
# Clone the repository
git clone https://github.com/gauravmehta13/razorpay_web.git
cd razorpay_web
# Get dependencies
flutter pub get
# Run tests
flutter test# Run example appcd example
flutter run