A multi-provider payment orchestration layer for Go β one interface, several African payment rails, automatic failover.
# π§΅ Loom
**A multi-provider payment orchestration layer for Go β one interface, several African payment rails, automatic failover.**
Loom sits between your application and payment providers like Paystack and Flutterwave, so your code calls one consistent API instead of hand-rolling retries, idempotency, and webhook parsing per provider. If one provider is down or erroring, Loom fails over to the next β automatically, with circuit breakers so a struggling provider gets skipped rather than repeatedly hammered.
```go
result, err := client.Charges.Initialize(ctx, &types.ChargeRequest{
Amount: types.Money{Value: 500000, Currency: types.NGN}, // β¦5,000.00
Email: "customer@example.com",
Reference: "order_1234",
})
// Loom picks a provider, tries it, and fails over automatically if needed β
// your code doesn't know or care whether Paystack or Flutterwave handled it.
```
---
## Why Loom exists
Integrating one African payment provider is manageable. Integrating three β each with its own SDK, its own webhook signature scheme, its own error shapes, its own uptime quirks β turns into duplicated glue code scattered across your app. Loom centralizes that:
- **One request type in, one response type out** β regardless of which provider actually processed it
- **Automatic failover** β a failed charge attempt on Provider A can retry on Provider B without your application code knowing
- **Circuit breakers per provider** β a provider that's actively failing gets temporarily skipped instead of retried into the ground
- **Idempotency built in** β duplicate requests (client retries, double form-submits) are locked and deduplicated before they ever reach a provider
- **Normalized webhooks** β verify signatures and parse events from any supported provider into one `WebhookEvent` shape
---
## Supported providers
| Provider | Charges | Refunds | Transfers | Virtual Accounts | Webhooks |
|---|:---:|:---:|:---:|:---:|:---:|
| Paystack | β
| β
| β
| β
| β
|
| Flutterwave | β
| β
| β¦