Flutterwave
Flutterwave is Africa's leading payment technology company, founded in 2016 and headquartered in San Francisco. The company provides payment infrastructure that enables businesses to accept payments from customers across Africa and globally.
Why Flutterwave?
Flutterwave has established itself as a powerhouse in African fintech with impressive reach and capabilities:
- Extensive Coverage: Operates in 34+ African countries with regulatory licenses in the US, UK, EU, Canada, and India
- Multi-Currency Support: Accept payments in 30+ currencies
- Multiple Payment Methods: Cards, bank transfers, mobile money, USSD, and more
- Proven Scale: Processed $1 billion for East Asian merchants in H1 2025 alone
- Enterprise Ready: Used by global brands including Microsoft, Uber, and Booking.com
Getting Started with Flutterwave
Before integrating Flutterwave with Sails Pay, you'll need a Flutterwave account:
- Create a sandbox account: Sign up at Flutterwave Sandbox to get started with their v4 API
- Get API credentials: Access your test API keys from the sandbox dashboard
- Test your integration: Use the sandbox to explore APIs and test webhooks
- Go live: Once ready, complete KYC verification for production access
What you get with a Sandbox account
- Test API Keys: Explore and test Flutterwave APIs, and generate secret keys to securely grant your applications access to sensitive data and functions
- Test Webhooks: Securely test how your applications handle real-time data updates, ensuring everything works smoothly before going live
TIP
Start with a Sandbox account to develop and test your integration. Test credentials start with FLWPUBK_TEST- and FLWSECK_TEST-.
Installation
Specifying the adapter
In config/pay.js create a default payment provider and set the adapter property to @sails-pay/flutterwave.
module.exports.pay = {
providers: {
default: {
adapter: '@sails-pay/flutterwave'
}
}
}TIP
Do well to run npm i @sails-pay/flutterwave if you haven't installed the adapter previously.
Configuration
You can configure the Flutterwave adapter for both production and local development.
Local development
In your config/local.js specify the following object:
module.exports = {
pay: {
providers: {
default: {
clientId: 'FLWPUBK_TEST-xxxxxxxxxxxxxxxxxxxxxx',
clientSecret: 'FLWSECK_TEST-xxxxxxxxxxxxxxxxxxxxxx',
encryptionKey: 'FLWSECK_TESTxxxxxxxxxxxxxxxx'
}
}
}
}Production
For production set same properties in the default provider but in config/pay.js:
module.exports.pay = {
providers: {
default: {
adapter: '@sails-pay/flutterwave',
clientId: process.env.FLUTTERWAVE_CLIENT_ID,
clientSecret: process.env.FLUTTERWAVE_SECRET,
encryptionKey: process.env.FLUTTERWAVE_ENCRYPTION_KEY
}
}
}TIP
Note we are using environment variables in production as you don't want to commit those credentials to source control.
Configuring values
If you're unsure how to obtain the configuration values shown above, please refer to the links and instructions provided below:
clientId, clientSecret, and encryptionKey
To get your Flutterwave API credentials:
- Log in to your Flutterwave Dashboard
- Click on Settings from the left sidebar
- Select API Keys under the Developers tab
- Copy your Public Key (use as
clientId), Secret Key (use asclientSecret), and Encryption Key - Use test mode keys for development (starting with
FLWPUBK_TEST-andFLWSECK_TEST-) - Switch to live mode for production keys
WARNING
Keep your secret key and encryption key secure! Never commit them to source control or expose them in client-side code.
Default environment variables
If you don't provide configuration values, the adapter will automatically look for these environment variables as fallbacks:
| Config Value | Environment Variable |
|---|---|
clientId | FLUTTERWAVE_CLIENT_ID |
clientSecret | FLUTTERWAVE_SECRET |
encryptionKey | FLUTTERWAVE_ENCRYPTION_KEY |
This means you can simply set the environment variables and use a minimal configuration:
module.exports.pay = {
providers: {
default: {
adapter: '@sails-pay/flutterwave'
}
}
}Next steps
- Creating checkouts - Redirect users to complete payment