Why Use Flutterwave with Odoo?
Flutterwave is Africa's leading payment infrastructure company, processing payments in over 30 African countries. For businesses operating in or selling to Africa, Flutterwave supports payment methods that global gateways like Stripe do not — mobile money (M-Pesa, MTN Mobile Money, Airtel Money), bank transfers, USSD payments, and local card networks.
Connecting Flutterwave to Odoo means you can accept payments from African customers through their preferred local payment methods while managing everything in Odoo's accounting and sales modules.
Supported Payment Methods
| Method | Countries | Use Case |
|---|---|---|
| Mobile Money | Kenya, Ghana, Uganda, Tanzania, Rwanda | Most popular in East/West Africa |
| Bank Transfer | Nigeria, South Africa, Kenya | B2B, large transactions |
| Card (Visa/MC) | All supported countries | Urban, salaried customers |
| USSD | Nigeria, Ghana | Feature phone users |
| Barter (Flutterwave wallet) | All | Repeat customers |
| Apple/Google Pay | Where available | Mobile-first customers |
Prerequisites
- Flutterwave merchant account (free to create)
- Business verification completed (KYB for higher limits)
- Odoo with Sales, Invoicing/Accounting modules
- HTTPS-enabled Odoo instance for webhook callbacks
Step 1: Get Flutterwave API Keys
- Log into dashboard.flutterwave.com
- Go to Settings → API Keys
- Copy your Public Key, Secret Key, and Encryption Key
- Set up Webhook URL under Settings → Webhooks
Step 2: Create Payment Link from Odoo
import requests
FLW_SECRET = 'FLWSECK-xxxxxxxxxxxxxxxx'
def create_flutterwave_payment(invoice):
resp = requests.post(
'https://api.flutterwave.com/v3/payments',
headers={
'Authorization': f'Bearer {FLW_SECRET}',
'Content-Type': 'application/json',
},
json={
'tx_ref': f'ODOO-INV-{invoice.name}',
'amount': invoice.amount_residual,
'currency': invoice.currency_id.name, # NGN, KES, GHS, etc.
'redirect_url': f'https://your-odoo.com/flw/callback',
'customer': {
'email': invoice.partner_id.email,
'name': invoice.partner_id.name,
'phonenumber': invoice.partner_id.phone or '',
},
'customizations': {
'title': 'Invoice Payment',
'description': f'Payment for {invoice.name}',
},
'payment_options': 'card,mobilemoney,ussd,banktransfer',
}
)
return resp.json()['data']['link'] # Redirect customer hereStep 3: Handle Webhook
from odoo import http
import json, hashlib
FLW_SECRET_HASH = 'your_webhook_secret_hash'
class FlutterwaveWebhook(http.Controller):
@http.route('/flutterwave/webhook', type='json', auth='none', csrf=False)
def handle(self, **kwargs):
# Verify webhook
sig = http.request.httprequest.headers.get('verif-hash')
if sig != FLW_SECRET_HASH:
return {'status': 'unauthorized'}
data = json.loads(http.request.httprequest.data)
event = data.get('event')
txn = data.get('data', {})
if event == 'charge.completed' and txn.get('status') == 'successful':
tx_ref = txn.get('tx_ref', '')
amount = txn.get('amount')
# Find invoice by tx_ref
if tx_ref.startswith('ODOO-INV-'):
inv_name = tx_ref.replace('ODOO-INV-', '')
invoice = http.request.env['account.move'].sudo().search(
[('name', '=', inv_name)], limit=1
)
if invoice:
self._register_payment(invoice, amount, txn)
return {'status': 'ok'}
def _register_payment(self, invoice, amount, txn):
payment = http.request.env['account.payment'].sudo().create({
'payment_type': 'inbound',
'partner_id': invoice.partner_id.id,
'amount': amount,
'currency_id': invoice.currency_id.id,
'journal_id': self._get_flw_journal().id,
'ref': f"Flutterwave {txn.get('flw_ref', '')}",
})
payment.action_post()Step 4: Verify Transactions
Always verify completed payments server-side before registering them in Odoo. Flutterwave recommends verifying every webhook notification:
def verify_transaction(transaction_id):
resp = requests.get(
f'https://api.flutterwave.com/v3/transactions/{transaction_id}/verify',
headers={'Authorization': f'Bearer {FLW_SECRET}'}
)
data = resp.json()['data']
return data['status'] == 'successful' and data['amount'] >= expected_amountMulti-Currency Support
Flutterwave supports multiple African currencies:
| Currency | Country | Code |
|---|---|---|
| Nigerian Naira | Nigeria | NGN |
| Kenyan Shilling | Kenya | KES |
| Ghanaian Cedi | Ghana | GHS |
| South African Rand | South Africa | ZAR |
| Tanzanian Shilling | Tanzania | TZS |
| Ugandan Shilling | Uganda | UGX |
Set up corresponding currencies in Odoo with exchange rates. Flutterwave settles in your chosen currency, so record the settlement separately for reconciliation.
Flutterwave Pricing
| Region | Local Rate | International Rate |
|---|---|---|
| Nigeria | 1.4% | 3.8% |
| Other Africa | varies | 3.8% |
| International cards | 3.8% | 3.8% |
DeployMonkey + Flutterwave
DeployMonkey instances support Flutterwave webhook integration for African payment processing. Our AI agent can help configure multi-currency accounting, set up the payment journal, and test the payment flow.