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. Build a Tutoring Marketplace with Split Payments
Bonaventure OgetoBy Bonaventure Ogeto|Updated July 22, 2026

Build a Tutoring Marketplace with Split Payments

Build a tutoring marketplace with split payments by onboarding tutors with Paystack subaccounts (each tutor gets a subaccount tied to their bank account), then initializing each session payment with the tutor's subaccount code. Paystack routes 80% to the tutor at settlement and 20% stays in your platform account. The student pays one amount; Paystack handles the split.

In this article

  1. 1. Tutor Onboarding with Subaccounts
  2. 2. Session Booking and Payment
  3. 3. Learn More

Tutor Onboarding with Subaccounts

Tables: tutors (name, email, subject, hourly_rate, paystack_subaccount_code, status), sessions (tutor_id, student_id, subject, duration_mins, total_amount, scheduled_at, status, paystack_ref), students (name, email).

async function onboardTutor(tutorData) {
  // Create Paystack subaccount with tutor's bank details
  var res = 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: tutorData.name + ' - Tutoring',
      bank_code: tutorData.bank_code,
      account_number: tutorData.account_number,
      percentage_charge: 80, // Tutor gets 80%, platform keeps 20%
    }),
  });
  var data = await res.json();

  await db.tutors.update(tutorData.id, {
    paystack_subaccount_code: data.data.subaccount_code,
    status: 'active',
  });
  return data.data.subaccount_code;
}

The subaccount is created once per tutor. After that, every session payment automatically routes the tutor's share to their bank account at settlement — no manual payout work needed.

Session Booking and Payment

async function bookSession(studentId, studentEmail, tutorId, scheduledAt, durationMins) {
  var tutor = await db.tutors.findById(tutorId);
  var totalAmount = Math.ceil((tutor.hourly_rate / 60) * durationMins);

  var reference = 'SES-' + Date.now();
  var session = await db.sessions.create({
    tutor_id: tutorId, student_id: studentId,
    duration_mins: durationMins, total_amount: totalAmount,
    scheduled_at: scheduledAt, status: 'pending',
    paystack_ref: reference,
  });

  var res = await fetch('https://api.paystack.co/transaction/initialize', {
    method: 'POST',
    headers: { Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({
      email: studentEmail,
      amount: totalAmount,
      currency: 'NGN',
      reference,
      subaccount: tutor.paystack_subaccount_code,
      bearer: 'account', // platform bears Paystack fees
      metadata: { session_id: session.id, tutor_id: tutorId, duration_mins: durationMins },
    }),
  });
  return (await res.json()).data.authorization_url;
}

// Webhook: confirm booking
if (event.event === 'charge.success') {
  var sessionId = event.data.metadata.session_id;
  await db.sessions.update(sessionId, { status: 'confirmed' });
  await notifyTutor(event.data.metadata.tutor_id, sessionId);
  await notifyStudent(studentId, sessionId);
}

At settlement time, Paystack sends 80% to the tutor's bank account and 20% stays in your platform Paystack account. You do not need to manually calculate or transfer the split — it is automatic.

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

See build a home services booking marketplace for the same subaccount split pattern applied to service providers.

Sign up for the McTaba newsletter

Key Takeaways

  • ✓Create a Paystack subaccount per tutor — they receive their share automatically at settlement.
  • ✓The platform keeps commission without manually transferring money to tutors.
  • ✓Set the split percentage based on your commission model (80/20 or 70/30).
  • ✓Tutors need to complete KYC (bank account verified by Paystack) before they can receive payouts.
  • ✓Handle session reschedules by updating the booking without creating a new payment transaction.

Frequently Asked Questions

When does the tutor receive their payment?
Paystack settles subaccount funds on the same T+1 or T+2 schedule as your main account (depending on the currency and market). The tutor does not receive money instantly — they receive it the next business day or within 2 business days. Communicate this clearly to tutors during onboarding so they understand settlement timing.
What if a student wants a refund after the session has already happened?
Establish a refund policy before launch. Common approach: refund if the tutor did not show up, no refund if the session was completed. Partial refunds for sessions where the tutor logged off early. If you issue a refund after the subaccount has already settled, Paystack debits the refund from your next settlement — meaning you may need to reclaim the funds from the tutor separately.
How do I handle group tutoring sessions where multiple students pay?
Each student pays separately for the same session. Create one session record and multiple payment records (one per student). The tutor's subaccount receives their percentage of each student's payment. Track attendance per student to handle partial refunds if a student misses a group session they already paid for.

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

Things You Can Build with Paystack: Project Guides

A complete map of real-world projects you can build using the Paystack API. From online store checkouts and subscription platforms to savings apps and solar pay-as-you-go systems, each category links to step-by-step build guides with working code.

Read more

Build a Parking Payment App

A build guide for a parking payment app where drivers scan a QR code on entry, pay for their session via Paystack (card or M-Pesa), and the system validates payment before the barrier lifts for exit. Covers time-based pricing, session management, and overstay handling.

Read more

Build an Affiliate Commission Engine

A build guide for an affiliate commission engine where affiliates share tracking links, earn commissions when their referrals convert (pay via Paystack), and withdraw their balance via bank transfer. Covers click tracking, last-click attribution, commission ledger, and Paystack Transfers payout.

Read more

Build a Farmers Market Ordering Platform

A build guide for a farmers market ordering platform where customers order fresh produce from multiple farmers in one cart, the platform collects the combined payment via Paystack, and each farmer receives their share via Paystack Split Payments or Transfers. Covers inventory management, order routing to individual farmers, and delivery coordination.

Read more

Building a Matatu or Transport Fare Collection System

A practical build guide for transport fare collection in Kenya. Covers the honest trade-offs between Paystack and direct Daraja for matatu payments, QR code fare collection, multi-route support, driver and conductor apps, daily reconciliation, and the real constraints of cashless transport in Nairobi.

Read more

Commission Models on Paystack Splits

Paystack splits let your platform automatically collect commission on every transaction. This guide covers percentage commission, flat service fees, and tiered commission by vendor volume — with code for each model.

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.