Skip to content

Introduction

Sanwo (Yoruba: “pay money”) is a free, open-source payment SDK that gives you a single, unified API for every payment provider on every platform. It is licensed under Apache-2.0 — no fees, no accounts, no strings attached.

Every payment provider ships its own SDK with its own API surface, its own configuration format, and its own quirks. Integrating one is fine. Integrating three across web and mobile is a nightmare. Swapping providers means rewriting your checkout flow.

Sanwo fixes this. You write your payment code once. When you want to switch from Paystack to Flutterwave, you change a single import.

Provider Package
Paystack @sanwohq/paystack
Flutterwave @sanwohq/flutterwave
Razorpay @sanwohq/razorpay
Monnify @sanwohq/monnify
Interswitch @sanwohq/interswitch

More providers are coming — or build your own with a simple HTML template.

Platform Package
Web / JavaScript @sanwohq/web
React @sanwohq/react
React Native @sanwohq/react-native
Flutter sanwo_flutter
iOS / Swift Swift Package Manager
Android / Kotlin JitPack
Laravel sanwohq/laravel (Composer)
.NET / C# Sanwo (NuGet)
Platform Integration
Any HTML page @sanwohq/embed (CDN script tag)
WordPress Plugin with shortcodes, Gutenberg block, WooCommerce gateway
Shopify Liquid snippets and theme sections
Webflow Custom code embed
Wix HTML widget or Velo
Squarespace Code block
Bubble HTML element
Framer Code component or embed
Carrd Embed widget
Ghost Code injection
Notion Sites Embed block
Typedream Custom code block
Softr Custom code block

See the No-Code Platforms section for setup guides.

Sanwo’s API has three core types:

A provider defines which payment gateway to use. You import one and pass it to Sanwo at initialization.

import { paystack } from "@sanwohq/paystack";

CheckoutOptions describes what to charge. The shape is identical across every provider.

const options = {
amount: 500000, // minor units (e.g. 5000.00 NGN = 500000 kobo)
currency: "NGN",
customer: { email: "customer@example.com" },
reference: "order_abc123",
};

CheckoutResult is a discriminated union on status that tells you what happened.

type CheckoutResult =
| { status: "successful"; reference: string; providerResponse: unknown }
| { status: "cancelled" }
| { status: "failed"; error: string }
| { status: "pending"; reference: string };
  1. You pass a provider and checkout options to Sanwo.
  2. Sanwo renders the provider’s checkout UI inside an iframe (web) or webview (mobile).
  3. Sanwo handles all bridge communication between your app and the provider’s UI.
  4. When the customer completes (or cancels) payment, Sanwo returns a typed CheckoutResult.

Sanwo is a thin orchestration layer. Payments flow directly from your customer to the payment provider. Sanwo never touches your money. Your provider dashboard, webhooks, and settlement process stay exactly the same.