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 Church Contributions Mobile App
Bonaventure OgetoBy Bonaventure Ogeto|Updated July 22, 2026

Build a Church Contributions Mobile App

Build a church contributions app by creating named giving categories (tithe, offering, building fund, missions), collecting each contribution via Paystack with the category in the metadata, storing contributions per member per category, sending a PDF receipt on charge.success, and providing the treasurer with a real-time reporting dashboard showing totals by category, date range, and member.

In this article

  1. 1. Giving Categories and Contribution Collection
  2. 2. Recurring Pledges and Treasurer Reporting
  3. 3. Learn More

Giving Categories and Contribution Collection

Tables: giving_categories (name, description, is_recurring_enabled), contributions (member_id, category_id, amount, is_anonymous, paystack_ref, receipt_url, given_at), members (name, phone, email, cell_group).

var GIVING_CATEGORIES = {
  tithe:        { id: 1, name: 'Tithe', description: '10% of your income' },
  offering:     { id: 2, name: 'Offering', description: 'General offering' },
  building_fund: { id: 3, name: 'Building Fund', description: 'New sanctuary construction' },
  missions:     { id: 4, name: 'Missions & Outreach', description: 'Support our mission work' },
  special:      { id: 5, name: 'Special Appeal', description: '' }, // updated per campaign
};

async function give(memberEmail, memberId, categoryId, amount, isAnonymous) {
  var category = await db.givingCategories.findById(categoryId);
  var reference = 'GIVE-' + categoryId + '-' + Date.now();

  var contribution = await db.contributions.create({
    member_id: isAnonymous ? null : memberId,
    category_id: categoryId,
    amount,
    is_anonymous: isAnonymous,
    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: memberEmail, amount, currency: 'NGN', reference,
      metadata: {
        contribution_id: contribution.id,
        member_id: isAnonymous ? null : memberId,
        category: category.name,
        is_anonymous: isAnonymous,
      },
    }),
  });
  return (await res.json()).data.authorization_url;
}

// Webhook: record contribution and send receipt
if (event.event === 'charge.success') {
  var meta = event.data.metadata;
  if (!meta.contribution_id) return res.sendStatus(200);

  await db.contributions.update(meta.contribution_id, { given_at: new Date() });

  if (!meta.is_anonymous && meta.member_id) {
    var receiptUrl = await generateContributionReceipt(meta.contribution_id, event.data);
    await db.contributions.update(meta.contribution_id, { receipt_url: receiptUrl });
    var member = await db.members.findById(meta.member_id);
    await sendReceiptEmail(member.email, member.name, meta.category, event.data.amount / 100, receiptUrl);
  }
}

Recurring Pledges and Treasurer Reporting

// Set up monthly giving pledge
async function setupRecurringPledge(memberEmail, memberId, categoryId, monthlyAmount) {
  var category = await db.givingCategories.findById(categoryId);
  if (!category.is_recurring_enabled) throw new Error('Recurring giving not available for this category');

  // Use Paystack Plans for recurring giving
  var plan = await getOrCreatePlan(category.name + ' - NGN ' + (monthlyAmount / 100) + '/month', monthlyAmount);

  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: memberEmail, amount: monthlyAmount,
      plan: plan.plan_code,
      metadata: { member_id: memberId, category_id: categoryId, pledge_type: 'recurring' },
    }),
  });
  return (await res.json()).data.authorization_url;
}

// Treasurer: get contribution report
async function getTreasurerReport(startDate, endDate, categoryId) {
  var query = { given_at_gte: startDate, given_at_lte: endDate };
  if (categoryId) query.category_id = categoryId;

  var contributions = await db.contributions.findAll(query);
  var totalByCategory = {};

  for (var c of contributions) {
    var cat = await db.givingCategories.findById(c.category_id);
    if (!totalByCategory[cat.name]) totalByCategory[cat.name] = 0;
    totalByCategory[cat.name] += c.amount;
  }

  return {
    period: { start: startDate, end: endDate },
    total: contributions.reduce(function(sum, c) { return sum + c.amount; }, 0),
    count: contributions.length,
    by_category: totalByCategory,
    average_per_contributor: contributions.length > 0 ?
      contributions.reduce(function(sum, c) { return sum + c.amount; }, 0) / contributions.length : 0,
  };
}

// Top contributors report (for stewardship recognition, if members consent)
async function getTopContributors(startDate, endDate, limit) {
  return await db.contributions.findTopContributors(startDate, endDate, limit, false /* exclude anonymous */);
}

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 group contribution app for a related group money collection pattern applied to chamas and community savings groups.

Sign up for the McTaba newsletter

Key Takeaways

  • ✓Tag each contribution to a named category (tithe, offering, building fund) in Paystack metadata.
  • ✓Send a PDF receipt to the giver immediately after charge.success — churches are often required to issue receipts.
  • ✓Support recurring pledges using Paystack Plans — monthly giving is more predictable than one-time donations.
  • ✓Provide a treasurer dashboard with totals by category, member, and date range.
  • ✓Allow anonymous giving but provide an option for members to link contributions to their member profile.

Frequently Asked Questions

Is digital tithing via an app accepted in Nigerian and Kenyan churches?
Yes, widely. Many Nigerian Pentecostal churches (RCCG, Winners Chapel, Daystar) and Kenyan churches (PCEA, CITAM, Nairobi Chapel) have adopted digital giving. Digital platforms increase giving by making it convenient for members who do not carry cash — they can give during the service from their phone. Pastors often announce the app and show QR codes on the screen during offering time.
How do I handle tithe calculations for members who want help with the math?
Add a tithe calculator on the giving screen: the member enters their income, the app calculates 10% and pre-fills the amount field. Members can adjust the amount before paying. Some apps connect to payroll systems for automatic tithe deduction with member consent, but this requires deeper integration than a basic giving app.
Does the church need a Paystack merchant account, or can it use a personal one?
Churches are legal entities (NGOs, trusts, or incorporated associations) and should have a business/organizational Paystack account registered in the church's legal name. Using a personal account for organizational funds creates tax, audit, and governance problems. The church's treasurer or accountant should be the Paystack account holder, with appropriate signatories per the church's constitution.

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 a Referral Payout System

A build guide for a referral payout system where users share referral links, earn commissions when referrals convert, and withdraw their balance via Paystack Transfers to their bank account or M-Pesa wallet.

Read more

Build a Veterinary Clinic Booking and Payment System

A build guide for a veterinary clinic booking and payment system where pet owners book appointments online, pay a deposit via Paystack to confirm the slot, and pay the balance at the clinic after the consultation. Includes pet health records, vaccination schedules, and automated reminders.

Read more

Airtel Money Through Paystack in Kenya

The practical reality of accepting Airtel Money through Paystack in Kenya. What Paystack supports, what gaps exist, why Airtel Money matters for reaching rural and budget-conscious customers, alternative providers that support it, and how to build a hybrid payment system that covers both Safaricom and Airtel subscribers.

Read more

Paystack Multi-Split Payments Explained

A thorough walkthrough of Paystack multi-split payments: creating Transaction Split groups, assigning shares to multiple subaccounts, using split codes in transactions, updating split groups dynamically, and handling the edge cases around rounding, residuals, and per-order split group creation.

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.