Choosing a Provider
Sanwo supports six payment providers. Each one is a separate package you install alongside the core SDK. Swapping providers is a one-line change.
Provider comparison
Section titled “Provider comparison”| Provider | Package | Regions | Currencies | Minor units natively? |
|---|---|---|---|---|
| Paystack | @sanwohq/paystack |
Africa | NGN, GHS, ZAR, USD, KES | Yes |
| Flutterwave | @sanwohq/flutterwave |
Africa + Global | 12+ (NGN, USD, GHS, KES, ZAR, GBP, EUR, …) | No (Sanwo converts) |
| Stripe | @sanwohq/stripe |
Global | 20+ (USD, EUR, GBP, NGN, INR, …) | Yes |
| Razorpay | @sanwohq/razorpay |
India | INR, USD, EUR + more | Yes |
| Monnify | @sanwohq/monnify |
Nigeria | NGN | No (Sanwo converts) |
| Interswitch | @sanwohq/interswitch |
Nigeria | NGN | Yes |
Amount handling
Section titled “Amount handling”You always pass amounts in minor units (kobo, cents, paise). Sanwo handles conversion for providers that expect major units.
// You always write this — regardless of provider:const options = { amount: 500000, // 5,000.00 NGN in kobo currency: "NGN", customer: { email: "customer@example.com" },};- Paystack, Stripe, Razorpay, Interswitch accept minor units natively, so Sanwo passes the value through.
- Flutterwave, Monnify expect major units, so Sanwo divides by 100 before sending to the provider.
You never need to think about this. Just pass minor units.
Paystack
Section titled “Paystack”Best for businesses in Africa. Supports cards, bank transfers, mobile money, and USSD.
npm i @sanwohq/paystackflutter pub add sanwo_paystackimport { paystack } from "@sanwohq/paystack";
const provider = paystack({ publicKey: "pk_test_xxx" });Supported currencies: NGN, GHS, ZAR, USD, KES
Payment methods: Cards, bank transfer, mobile money, USSD, QR
Flutterwave
Section titled “Flutterwave”Broad coverage across Africa with global reach. Supports 12+ currencies and multiple payment methods.
npm i @sanwohq/flutterwaveflutter pub add sanwo_flutterwaveimport { flutterwave } from "@sanwohq/flutterwave";
const provider = flutterwave({ publicKey: "FLWPUBK_TEST-xxx" });Supported currencies: NGN, USD, GHS, KES, ZAR, GBP, EUR, TZS, UGX, RWF, XAF, XOF, and more
Payment methods: Cards, bank transfer, mobile money, USSD, Mpesa, bank account
Stripe
Section titled “Stripe”The most widely used payment platform globally. Supports 135+ currencies and dozens of payment methods including Apple Pay, Google Pay, and local methods.
npm i @sanwohq/stripeflutter pub add sanwo_stripeimport { stripe } from "@sanwohq/stripe";
const provider = stripe({ publicKey: "pk_test_xxx" });Stripe requires a server-side Payment Intent before checkout. Your backend creates the Payment Intent using your secret key, then passes the clientSecret to the frontend:
const result = await sanwo.checkout({ amount: 100000, // 1,000.00 USD in cents currency: "USD", customer: { email: "customer@example.com" }, sanwoProviderOptions: { clientSecret: "pi_xxx_secret_xxx", // from your server },});Supported currencies: USD, EUR, GBP, CAD, AUD, JPY, NGN, INR, ZAR, KES, GHS, and 120+ more
Payment methods: Cards, Apple Pay, Google Pay, bank transfer, SEPA, iDEAL, Klarna, Afterpay, Cash App, Link
Razorpay
Section titled “Razorpay”The go-to provider for India. Supports UPI, net banking, wallets, and international cards.
npm i @sanwohq/razorpayflutter pub add sanwo_razorpayimport { razorpay } from "@sanwohq/razorpay";
const provider = razorpay({ keyId: "rzp_test_xxx" });Supported currencies: INR, USD, EUR, GBP, SGD, and more
Payment methods: UPI, cards, net banking, wallets, EMI, pay later
Monnify
Section titled “Monnify”Nigeria-focused provider with strong bank transfer support.
npm i @sanwohq/monnifyflutter pub add sanwo_monnifyimport { monnify } from "@sanwohq/monnify";
const provider = monnify({ apiKey: "MK_TEST_xxx", contractCode: "1234567890",});Supported currencies: NGN
Payment methods: Cards, bank transfer, USSD, phone number
Interswitch
Section titled “Interswitch”One of Nigeria’s oldest payment processors. Used widely in enterprise and government.
npm i @sanwohq/interswitchflutter pub add sanwo_interswitchimport { interswitch } from "@sanwohq/interswitch";
const provider = interswitch({ merchantCode: "MX_TEST_xxx", payItemID: "Default_Payable_MX_xxx",});Supported currencies: NGN
Payment methods: Cards, Verve, bank transfer
Swapping providers
Section titled “Swapping providers”The whole point of Sanwo is that switching providers is trivial. Your checkout code stays the same — only the import changes.
// Before: Paystackimport { paystack } from "@sanwohq/paystack";const provider = paystack({ publicKey: "pk_test_xxx" });
// After: Flutterwaveimport { flutterwave } from "@sanwohq/flutterwave";const provider = flutterwave({ publicKey: "FLWPUBK_TEST-xxx" });Everything else — CheckoutOptions, CheckoutResult, your UI code — remains untouched.
Don’t see your provider?
Section titled “Don’t see your provider?”You can build a custom provider for any payment gateway. A provider is just a plain object with an HTML template — no SDK needed.