Overview
Flutterwave provides payment processing for African currencies and international transactions. TelemanAI supports Flutterwave for subscription payments with support for multiple currencies.Prerequisites
- Flutterwave business account
- API keys (Public and Secret)
- Webhook secret hash
Configuration
Environment Variables
Add these variables to your.env file:
Your Flutterwave public key for client-side operations
Your Flutterwave secret key for server-side API calls
Secret hash for verifying webhook signatures
Default currency code (NGN, GHS, KES, UGX, ZAR, etc.)
Set to
YES to enable, NO to disableSupported Currencies
Flutterwave supports multiple African and international currencies:- NGN - Nigerian Naira
- GHS - Ghanaian Cedi
- KES - Kenyan Shilling
- UGX - Ugandan Shilling
- ZAR - South African Rand
- USD - US Dollar
- EUR - Euro
- GBP - British Pound
Setup Steps
Create Flutterwave Account
Sign up at flutterwave.com and complete business verification.
Set Up Webhooks
Configure webhook URL in Flutterwave dashboard:Copy the webhook secret hash and add it to
FLW_SECRET_HASH.Payment Flow
- User selects subscription package
- Chooses Flutterwave as payment method
- Redirected to Flutterwave payment page
- Completes payment with card/mobile money
- Redirected back to TelemanAI
- Webhook verifies payment
- Subscription activated
Webhook Configuration
Flutterwave sends payment notifications to your webhook URL. The system automatically verifies webhook signatures usingFLW_SECRET_HASH.
Webhook Events
charge.completed- Payment successfulcharge.failed- Payment failedcharge.pending- Payment pending
Testing
Test Cards
| Card Number | Type | CVV | PIN | OTP |
|---|---|---|---|---|
| 5531886652142950 | Mastercard | 564 | 3310 | 12345 |
| 4187427415564246 | Visa | 828 | 3310 | 12345 |
Test Mode
Ensure you’re using test keys during development:Troubleshooting
Payment fails immediately
Payment fails immediately
- Verify API keys are correct
- Check that
FLUTTERWAVE=YESin .env - Ensure currency code is supported
- Clear application cache
Webhook not received
Webhook not received
- Verify webhook URL is accessible publicly
- Check webhook secret hash matches
- Review Flutterwave webhook logs
- Ensure HTTPS is enabled in production
Currency mismatch error
Currency mismatch error
- Set
FLW_CURRENCYto match your Flutterwave account - Ensure package prices use the same currency
- Some currencies require account approval
Security Best Practices
- Store keys in
.envfile - Use test keys for development
- Verify webhook signatures
- Enable HTTPS in production
- Regularly rotate API keys
- Monitor transactions for fraud
Mobile Money Support
Flutterwave supports mobile money payments in supported countries:- M-Pesa (Kenya)
- Ghana Mobile Money
- Uganda Mobile Money
- Zambia Mobile Money
Next Steps
Payment Overview
View all payment gateways
Subscription Packages
Configure pricing packages
Payment Gateways
Learn about payment processing
Stripe Integration
Alternative payment gateway