Unified payment orchestration layer for African payment providers
# PayFuse
**Unified payment orchestration for Africa.**
One API. Every provider. Automatic failover.
---
## The Problem
Every African fintech integrates payment providers independently. When Paystack goes down, transactions fail. When you need to add Flutterwave, you rewrite your payment logic. When MTN MoMo needs a phone number format your system doesn't support, you patch it manually.
Every team solves the same problems. Separately. Repeatedly.
## The Solution
PayFuse sits between your application and every African payment provider. You call one API. PayFuse handles the rest — routing, failover, retries, webhook normalization, and circuit breaking.
```typescript
const result = await payfuse.charge({
amount: 50000,
currency: 'NGN',
email: 'customer@example.com',
});
// PayFuse automatically routes to the best available provider
// and fails over to the next if one goes down
```
---
## Supported Providers
| Provider | Charge | Verify | Refund | Webhooks |
|---|---|---|---|---|
| Paystack | ✅ | ✅ | ✅ | ✅ |
| Flutterwave | ✅ | ✅ | ✅ | ✅ |
| MTN MoMo | ✅ | ✅ | ⚠️ | ✅ |
| Interswitch | ✅ | ✅ | ✅ | ✅ |
| OPay | ✅ | ✅ | ✅ | ✅ |
> ⚠️ MTN MoMo refunds require the Disbursements product.
---
## Architecture
```
Your Application
↓
@payfuse/sdk
↓
Orchestration Engine
├── Provider Router (priority | round-robin | cost-based)
├── Circuit Breaker (auto-detects unhealthy providers)
└── Retry Manager (exponential backoff with jitter)
↓
Provider Adapters
├── Paystack
├── Flutterwave
├── MTN MoMo
├── Interswitch
└── OPay
↓
Webhook Normalizer → Unified Event Format
```
---
## Packages
| Package | Description |
|---|---|
| `@payfuse/core` | Shared types, interfaces, and contracts |
| `@payfuse/paystack` | Paystack adapter |
| `@payfuse/flutterwave` | Flutterwave adapter |
| `@payfuse/mtn-momo` | MTN MoMo adapter |
| `@payfuse/interswitch` | Interswitch adapter |
| `@payfuse/opay` | OPay adapter |
| `@payfuse/sdk` | Orchestration engine — …