Flutterwave
Provider ID: flutterwave
Flutterwave supports the most currencies of any Sanwo provider (12) and covers Africa plus global markets. It expects amounts in major units, but you still pass minor units to Sanwo – the engine divides by 100 automatically.
Installation
Section titled “Installation”npm i @sanwohq/flutterwaveflutter pub add sanwo_flutterwaveIn Xcode, go to File > Add Package Dependencies and add:
https://github.com/Sanwohq/iosSelect the SanwoFlutterwave product.
Add JitPack to settings.gradle.kts:
dependencyResolutionManagement { repositories { maven { url = uri("https://jitpack.io") } }}Then add the dependency in build.gradle.kts:
implementation("com.github.Sanwohq.android:sanwo-flutterwave:1.0.0")import { flutterwave } from "@sanwohq/flutterwave";
const provider = flutterwave({ publicKey: "FLWPUBK_TEST-xxxxxxxxxxxx" });Test keys start with FLWPUBK_TEST-. Get yours from the Flutterwave Dashboard.
Amount handling
Section titled “Amount handling”Flutterwave uses major units natively. Sanwo converts automatically (amountInMinorUnit: false internally).
| You pass | Flutterwave receives | Meaning |
|---|---|---|
500000 |
5000 |
5,000.00 NGN |
100 |
1 |
1.00 NGN |
You always pass minor units to Sanwo. The conversion is invisible to your code.
Supported currencies
Section titled “Supported currencies”NGN, GHS, KES, ZAR, USD, EUR, GBP, TZS, UGX, RWF, XAF, XOF
This is the broadest currency support of any Sanwo provider.
Supported countries
Section titled “Supported countries”NG, GH, KE, ZA, US, GB, TZ, UG, RW, CM, CI
Payment methods
Section titled “Payment methods”card, bank_transfer, ussd, mobile_money, apple_pay, qr
Provider-specific options
Section titled “Provider-specific options”Pass these via sanwoProviderOptions on web/React, or as flat fields on Flutter and mobile SDKs.
| Option | Type | Description |
|---|---|---|
paymentOptions |
string |
Comma-separated payment methods (e.g. "card,banktransfer") |
redirectUrl |
string |
URL to redirect the customer after payment |
paymentPlan |
string |
Plan ID for recurring payments |
subaccounts |
array |
Split payment config (see below) |
customizations |
object |
Customize the checkout UI (see below) |
Subaccounts (split payments)
Section titled “Subaccounts (split payments)”{ subaccounts: [ { id: "RS_xxxxxxxxxxxx", transaction_split_ratio: 3 }, { id: "RS_yyyyyyyyyyyy", transaction_split_ratio: 7 }, ]}The transaction_split_ratio is optional and defaults to equal splits.
Customizations
Section titled “Customizations”{ customizations: { title: "My Store", description: "Payment for order #1234", logo: "https://example.com/logo.png", }}Usage examples
Section titled “Usage examples”Custom checkout branding
Section titled “Custom checkout branding”const result = await checkout({ amount: 250000, currency: "NGN", customer: { email: "customer@example.com" }, sanwoProviderOptions: { paymentOptions: "card,banktransfer", customizations: { title: "Acme Store", description: "Order #1234", logo: "https://acme.com/logo.png", }, },});final result = await sanwo.checkout( CheckoutOptions( amount: 250000, currency: 'NGN', customer: Customer(email: 'customer@example.com'), paymentOptions: 'card,banktransfer', customizations: Customizations( title: 'Acme Store', description: 'Order #1234', logo: 'https://acme.com/logo.png', ), ),);Recurring payments
Section titled “Recurring payments”const result = await checkout({ amount: 100000, currency: "NGN", customer: { email: "customer@example.com" }, sanwoProviderOptions: { paymentPlan: "46557", },});Split payments
Section titled “Split payments”const result = await checkout({ amount: 500000, currency: "NGN", customer: { email: "customer@example.com" }, sanwoProviderOptions: { subaccounts: [ { id: "RS_xxxxxxxxxxxx", transaction_split_ratio: 6 }, { id: "RS_yyyyyyyyyyyy", transaction_split_ratio: 4 }, ], },});