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 from Manual Payouts to Paystack Splits
Bonaventure OgetoBy Bonaventure Ogeto|Updated July 22, 2026

Migrating from Manual Payouts to Paystack Splits

For each existing vendor, create a Paystack subaccount with POST /subaccount using their stored bank details. Store the returned subaccount_code. Update your checkout code to include the subaccount in transaction initialization. Run both systems in parallel for one payout cycle — verify Paystack settlement matches your manual calculation — then decommission manual payouts.

In this article

  1. 1. Create Subaccounts for Existing Vendors
  2. 2. Parallel Running and Validation
  3. 3. Learn More

Create Subaccounts for Existing Vendors

// Migration script: create subaccounts for all vendors
async function migrateVendorsToSubaccounts() {
  var vendors = await db.vendors.findAll({ where: { subaccount_code: null } });

  for (var vendor of vendors) {
    try {
      // Validate bank account first
      var resolveRes = await fetch(
        'https://api.paystack.co/bank/resolve?account_number=' + vendor.account_number + '&bank_code=' + vendor.bank_code,
        { headers: { Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY } }
      );
      var resolved = await resolveRes.json();

      if (!resolved.status) {
        console.error('Invalid account for vendor', vendor.id, resolved.message);
        continue;
      }

      // Create subaccount
      var subRes = await fetch('https://api.paystack.co/subaccount', {
        method: 'POST',
        headers: { Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY, 'Content-Type': 'application/json' },
        body: JSON.stringify({
          business_name: vendor.business_name,
          settlement_bank: vendor.bank_code,
          account_number: vendor.account_number,
          percentage_charge: 90, // Vendor gets 90%, platform keeps 10%
        }),
      });
      var subData = await subRes.json();

      await db.vendors.update(
        { subaccount_code: subData.data.subaccount_code },
        { where: { id: vendor.id } }
      );
      console.log('Migrated vendor', vendor.id, '→', subData.data.subaccount_code);
    } catch (e) {
      console.error('Failed for vendor', vendor.id, e.message);
    }

    await new Promise(r => setTimeout(r, 200)); // Rate limit: 5 req/sec
  }
}

Parallel Running and Validation

Before decommissioning manual payouts, run one full cycle in parallel:

  1. Enable Paystack splits for all new transactions
  2. Continue running manual payouts for that cycle (paying for pre-migration orders)
  3. After cycle ends, compare Paystack settlement report against your manual payout ledger
  4. Verify each vendor received the correct amount via both channels
  5. Decommission manual payout process once confirmed
// Validation query: compare expected vs actual payouts
var validationReport = await db.query(`
  SELECT
    v.id as vendor_id,
    v.business_name,
    SUM(o.vendor_share) as expected_payout,
    v.paystack_settled_this_cycle as actual_payout,
    SUM(o.vendor_share) - COALESCE(v.paystack_settled_this_cycle, 0) as discrepancy
  FROM orders o
  JOIN vendors v ON v.id = o.vendor_id
  WHERE o.paid_at BETWEEN '2026-07-01' AND '2026-07-31'
  GROUP BY v.id, v.business_name, v.paystack_settled_this_cycle
  HAVING ABS(SUM(o.vendor_share) - COALESCE(v.paystack_settled_this_cycle, 0)) > 1
`);
console.log('Discrepancies:', validationReport);

Get weekly developer tips

Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.

No spam. Unsubscribe anytime.

Learn More

This guide is part of the Paystack split payments guide.

Sign up for the McTaba newsletter

Key Takeaways

  • ✓Migration is not a switch-flip — run parallel for one cycle to validate amounts before decommissioning manual transfers.
  • ✓Create subaccounts for all existing vendors using stored bank details. Validate each with the Paystack resolve account endpoint.
  • ✓Update checkout to include subaccount: vendorSubaccountCode on every transaction.
  • ✓Vendor communication matters: tell them the payout cycle is changing from manual (Friday) to automated (T+1 or T+2 via Paystack).
  • ✓Paystack's settlement cycle is typically T+1 for cards. This may be faster or slower than your current manual schedule.
  • ✓Keep manual payout records for the transition period in case of disputes about missing payments.

Frequently Asked Questions

Will Paystack splits change my vendors' settlement timing?
Likely yes. Paystack settles subaccounts on their normal settlement cycle (typically T+1 for cards). If you were previously paying vendors every Friday manually, they will now receive funds automatically on T+1 after each transaction — which may actually be faster.
Do I need vendors' consent to create subaccounts for them?
Yes, in principle. Paystack subaccounts route settlement to the vendor's bank account. You need their consent to associate their bank details with your Paystack account. Include subaccount creation in your vendor onboarding terms of service.
What if a vendor changed their bank details between when you stored them and the migration?
The resolve account check during migration will flag invalid accounts. For each failure, send the vendor a link to update their bank details in your platform before creating their subaccount. Do not create subaccounts with unverified bank details.
Can I migrate mid-month without disrupting in-flight orders?
Yes. Orders placed before migration still show the old payment flow in your database. Pay out those orders manually as usual. Enable Paystack splits only for new orders placed after the migration date. This gives a clean cutover without mixing flows.

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 Split Payments and Marketplaces: Complete Guide

Everything you need to split payments on Paystack: creating subaccounts, choosing between percentage and flat splits, multi-split transactions, fee configuration, delayed settlement, escrow-style patterns, and building real marketplace products with working Node.js code.

Read more

Percentage vs Flat Split Configuration on Paystack

A detailed comparison of percentage and flat split configurations on Paystack. Covers how each model works, worked margin calculations across different transaction sizes, when to use percentage vs flat, implementing per-transaction overrides, and building hybrid models that combine both approaches.

Read more

Escrow-Style Flows on Paystack and Their Limits

A thorough analysis of what escrow-style flows you can and cannot build on Paystack. Covers the difference between true escrow and delayed settlement, how to use manual settlement for hold-and-release patterns, the limits around hold duration and fund recovery, regulatory considerations in African markets, and when Paystack is not the right tool for escrow.

Read more

Building a Freelance Marketplace on Paystack

A freelance marketplace holds client funds until the work is approved, then releases to the freelancer. This guide covers implementing that hold-and-release pattern using Paystack delayed settlement, collecting platform commission via splits, and handling disputes and refunds.

Read more

Managing Transfer Failures and Reversals

Transfers fail. Sometimes they succeed and then reverse. This guide covers the full spectrum of things that go wrong with Paystack transfers: common failure reasons and how to classify them, building retry logic that does not make things worse, handling the rare but critical reversal case, and creating an operations playbook for your team.

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.