McTaba Labs logo
Software EngineeringThe WhiteboardProjectsEventsMasterclassesWebinarsLearn
Book Call

500+ developers already in the community

Get answers, find accountability partners, and stay ahead

Join Discord →
McTaba Labs logo

Educating 1 million students in tech by 2030.

Programs

  • HighSchool Graduates Launchpad
  • AI & Business Automation
  • Corporate Training
  • McTaba Story & Mission
  • Full-Stack Curriculum
  • Course Pricing & Plans
  • Frequently Asked Questions

Resources

  • Join Discord Community
  • Tech Events in Nairobi
  • Masterclasses
  • Free Resources
  • Learn
  • Campus
  • Africa Tech Talent Report
  • Partner With Us
  • Start a Project
  • Our Work

Contact Us

  • 124 Manyani East Road, Lavington, Nairobi
  • +254727795603
  • Book a Discovery Call

Office Hours:

Mon-Fri: 9am - 2pm EAT

Sat: 10am - 12pm EAT

© 2027 McTaba Labs - A product of Edtech Industries. All rights reserved.

Privacy PolicyTerms of ServiceRefund Policy
  1. Learn
  2. Paystack for African Developers
  3. Migrating Between Payment Gateways Without Downtime
Bonaventure OgetoBy Bonaventure Ogeto|Updated July 22, 2026

Migrating Between Payment Gateways Without Downtime

Gateway migration strategy: 1) Run both gateways in parallel — new transactions go to the new gateway, old webhook handlers stay active for legacy transactions. 2) Migrate one-time checkout first — it is stateless, easiest to validate. 3) For subscriptions: let existing subscriptions run on the old gateway until they cancel or expire; new signups go to the new gateway. 4) Stored card authorizations cannot be migrated — customers must re-enter card details on the new gateway. 5) Keep the old gateway's webhook endpoint active for 90 days after cutover to catch late-arriving events.

Migration Plan

PhaseActionDurationRollback?
1. PreparationBuild and test new gateway integration in staging; set up new webhook endpoint1-2 weeksN/A (not live yet)
2. Soft launchRoute 5-10% of new checkouts to new gateway; keep old gateway as default1 weekYes — flip routing back
3. Ramp upIncrease new gateway traffic to 50%, then 100% for new checkouts1-2 weeksYes — flip routing back
4. SubscriptionsRoute new subscription sign-ups to new gateway; existing on old gatewayOngoing — subscriptions decay naturallyPartial — new subs on old gateway
5. Old gateway cleanupKeep old webhook handler active 90 days; then decommission3 months post-cutoverNo (but old gateway account stays open)
// Routing logic during migration (store in DB or env var)
var GATEWAY_ROUTING = {
  new_checkouts: 'new_gateway',    // flip this progressively
  new_subscriptions: 'new_gateway',
  existing_subscriptions: 'old_gateway', // never change this — tokens are gateway-specific
};

async function getGatewayForRequest(type, customerId) {
  if (type === 'subscription_renewal') {
    // Always use the gateway this customer's subscription is on
    var subscription = await db.subscriptions.findByCustomer(customerId);
    return subscription.gateway; // 'old_gateway' or 'new_gateway'
  }
  return GATEWAY_ROUTING[type] || 'new_gateway';
}

Learn More

See building a payment provider abstraction layer — the prerequisite that makes parallel running feasible.

Sign up for the McTaba newsletter

Key Takeaways

  • ✓Run old and new gateways in parallel during migration — never cut over all at once.
  • ✓Migrate one-time checkout first (stateless), subscriptions last (stateful and non-portable).
  • ✓Stored card tokens and subscription codes are not portable between gateways.
  • ✓Keep the old gateway's webhook endpoint active for 90 days post-cutover.
  • ✓Test the full payment flow on the new gateway with real transactions before traffic cutover.

Frequently Asked Questions

Can I migrate Paystack authorization codes (stored cards) to a new gateway?
No — Paystack authorization codes are tokens that point to card data stored in Paystack's PCI-DSS vault. They are not exportable. When you migrate, customers must re-enter their card details on the new gateway. You can smooth this by sending an email asking customers to update their payment method, or by triggering the re-entry flow on the next renewal attempt if the old gateway can no longer charge the card.
What happens to webhooks from the old gateway during migration?
Keep the old webhook endpoint active and processing events throughout migration and for 90 days after cutover. Paystack retries webhooks for up to 72 hours — you may receive events for old-gateway transactions long after you have switched new traffic to the new gateway. If you decommission the old webhook handler too early, those events will be lost and orders may not be fulfilled.
How do I tell customers their subscriptions have moved to a new provider?
For most customers, you should not need to — subscriptions on the old gateway continue to charge normally until they cancel. If you want to migrate customers actively (to get everyone on the new gateway), send a clear email explaining they need to re-enter their payment details, with a link to update their subscription. Offer a small credit or discount for the friction. Expect 20-30% of customers to not complete the update — plan for this in your revenue projections.

Learn Paystack Integration

KES 2,999

The definitive guide to building payment systems with Paystack — from your first transaction to production-grade payment infrastructure across Africa. 9 modules, 47 lessons. Free preview available.

Start Paystack Course

Not ready? Create Free Account

Keep reading

Paystack Alternatives and Comparisons: Honest Engineering Analysis

An honest engineering analysis of Paystack alternatives for African developers. Compares API design, documentation quality, webhook models, SDK coverage, settlement speed, and country reach across Flutterwave, Stripe, IntaSend, Pesapal, Monnify, Squad, and DPO Pay. Includes multi-gateway architecture, provider abstraction, and migration strategies.

Read more

Paystack vs Squad: Engineering Comparison

Squad is the payment gateway from GTBank (Guaranty Trust Bank), one of Nigeria's largest commercial banks. It is the product most commonly chosen by enterprise clients who want a bank-affiliated payment gateway. The engineering comparison with Paystack reveals where Squad wins and where Paystack leads.

Read more

Choosing a Payment Gateway: An Engineering Decision Framework

Choosing a payment gateway is not a brand preference. It is an engineering decision with long-term consequences for coverage, maintenance, and migration cost. Here is the framework to make it systematically.

Read more

Payment Gateway Due Diligence Checklist for CTOs

Signing a payment gateway contract without due diligence is a decision you will live with for years. A gateway can freeze your account, lose your transaction data, or get shut down by a regulator. This checklist helps you evaluate before you commit.

Read more

Paystack Transaction References: Design Patterns That Prevent Chaos

Your transaction reference is the single string that ties a Paystack payment to your internal records. A sloppy reference scheme leads to duplicate charges, mystery transactions, and 2 AM debugging sessions. This guide covers UUID, sequential, and composite patterns with code for each.

Read more

Explore related topics

M-Pesa & African Stack

M-Pesa Daraja API tutorials, USSD development, and WhatsApp Business API guides. The African Stack that global bootcamps do not teach.

Learn to Code in Kenya

Everything a Kenyan needs to know before writing their first line of code. Career paths, real costs, hardware requirements, and honest answers about what it takes.

Learning to Code

Roadmaps, language guides, and practical advice for learning to code and launching a programming career.

Breaking Into Tech

Practical, no-nonsense guides for anyone looking to start or change their career in tech. From choosing your first language to acing interviews.

The African Stack: Skills for This Market

The skills that make Kenyan developers hard to replace: M-Pesa, USSD, WhatsApp, fintech, and building for the African market.

Bonaventure Ogeto

Bonaventure Ogeto

Founder, McTaba Labs

Bonaventure is the founder of McTaba Labs, a coding bootcamp in Nairobi, Kenya. He has spent years building products for the African market and mentoring the next generation of developers across the continent.