Skip to content

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.

Terminal window
npm i @sanwohq/flutterwave
import { flutterwave } from "@sanwohq/flutterwave";
const provider = flutterwave({ publicKey: "FLWPUBK_TEST-xxxxxxxxxxxx" });

Test keys start with FLWPUBK_TEST-. Get yours from the Flutterwave Dashboard.

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.

NGN, GHS, KES, ZAR, USD, EUR, GBP, TZS, UGX, RWF, XAF, XOF

This is the broadest currency support of any Sanwo provider.

NG, GH, KE, ZA, US, GB, TZ, UG, RW, CM, CI

card, bank_transfer, ussd, mobile_money, apple_pay, qr

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: [
{ 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: {
title: "My Store",
description: "Payment for order #1234",
logo: "https://example.com/logo.png",
}
}
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",
},
},
});
const result = await checkout({
amount: 100000,
currency: "NGN",
customer: { email: "customer@example.com" },
sanwoProviderOptions: {
paymentPlan: "46557",
},
});
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 },
],
},
});