Bonaventure OgetoBy Bonaventure Ogeto|

Single Gateway vs Multi Gateway Architecture

Single gateway: simpler, lower maintenance, appropriate for most businesses under NGN 100M/month with a single primary market. Multi-gateway: add a second when you need failover (primary gateway outage affects revenue), market coverage (second gateway covers a country the first does not), or routing optimization (direct bank integrations for high volume). Do not add a second gateway because it "seems safer" — the operational complexity is real and the benefit only materializes if the first gateway fails, which should be rare.

Single vs Multi-Gateway Trade-offs

DimensionSingle GatewayMulti-Gateway
Integration complexityOne set of APIs, one webhook handler, one set of credentialsN times the complexity; requires abstraction layer
ReconciliationOne settlement report, one transaction log to reconcileMultiple reports, cross-gateway reference mapping required
FailoverIf gateway is down, payments failRoute to secondary on primary outage — requires health monitoring
Country coverageLimited to primary gateway's marketsRoute by country to the best gateway for each
Stored cards/subscriptionsToken lives on one gatewayTokens are not portable — each gateway stores its own
Maintenance burdenOne gateway to update when APIs changeAll gateways need updates when any changes
When to useStarting out, single market, under NGN 100M/monthScale, multi-market, or demonstrated failover need
// Multi-gateway routing example with health checking
class PaymentRouter {
  constructor(gateways) {
    this.gateways = gateways; // [{ name: 'paystack', client, healthy: true }, ...]
  }

  async route(country, amount, channel) {
    // Filter to gateways that support this country + channel
    var eligible = this.gateways.filter(g =>
      g.healthy && g.countries.includes(country) && g.channels.includes(channel)
    );

    if (!eligible.length) throw new Error('No healthy gateway available for ' + country + '/' + channel);

    // Simple round-robin or primary-first selection
    return eligible[0];
  }

  async healthCheck() {
    for (var g of this.gateways) {
      try {
        var res = await fetch(g.healthUrl, { timeout: 3000 });
        g.healthy = res.ok;
      } catch {
        g.healthy = false;
      }
    }
  }
}

Learn More

Key Takeaways

  • Start single-gateway. Add a second only when you have a specific, demonstrated need.
  • Multi-gateway adds complexity: two webhook handlers, two reconciliation flows, two sets of credentials to rotate.
  • Build a payment provider abstraction layer before adding a second gateway — retrofitting is painful.
  • Failover requires health checking and automatic routing — not just "we have two accounts".
  • Subscription tokens and stored card authorizations are gateway-specific — multi-gateway does not help with these.

Frequently Asked Questions

Does Paystack have its own failover?
Paystack has internal redundancy and processes payments across multiple acquiring banks. A Paystack outage is rare because of this internal architecture. That said, if Paystack's infrastructure has a widespread issue, all transactions routed through Paystack fail regardless of internal redundancy. The question is: how often does that happen, and what is the revenue impact when it does? For most businesses, a Paystack outage a few times per year is an acceptable risk compared to the complexity of maintaining a second integration.
Should I build multi-gateway from the start to "future-proof" my architecture?
No — this is premature optimization. Build a thin abstraction layer (an interface your payment code uses instead of calling Paystack directly), but only implement the Paystack adapter behind it. When you need a second gateway, add the second adapter. Building two full integrations from day one means double the surface area for bugs, double the maintenance, and two credential sets to manage — before you have any evidence you need the second gateway.
What is the best way to handle active subscriptions when adding a second gateway?
You cannot migrate Paystack subscription tokens to another gateway — they are gateway-specific. The practical approach: keep existing subscriptions on Paystack, route new subscriptions to whichever gateway based on your routing logic. Over time, as old subscriptions cancel and re-enroll, they will naturally migrate to the preferred gateway. Do not try to force-migrate active subscriptions.

Ready to build real-world apps?

Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.

Apply to the McTaba Marathon