Introduction
When building FlexDown, Ghana's real estate operating system, I faced a classic build vs buy decision: use Paystack's Split Payment feature or build it myself. In real estate transactions, multiple parties need to get paid from a single property transaction - the property owner (or agent), the platform, and sometimes third parties like lawyers or inspectors.
This article breaks down exactly how I built a custom split payment system that reduced our payment processing costs by over 60%, while maintaining the same reliability and user experience.
The Problem
Real estate transactions in Ghana are complex. When a buyer pays for a property on FlexDown, multiple parties need their share:
• Property Owner/Seller: Gets the bulk of the payment (typically 85-90%)
• Agent (if involved): Receives their commission (usually 5-10%)
• Platform (FlexDown): Takes a service fee (2-5%)
• Third Parties: Sometimes lawyers, inspectors, or property managers need payment
Paystack offers a Split Payment feature that handles this automatically. Sounds perfect, right? But there's a catch.
Paystack Split Payments Cost Structure:
• Standard transaction fee: 1.5% + GH₵100 cap at GH₵2,000
• Split payment fee: Additional GH₵50 per subaccount per transaction
• For a 3-way split: That's GH₵150 in additional fees per transaction
For a real estate platform processing property transactions worth hundreds of thousands of cedis, those GH₵150 fees per split add up incredibly fast. We needed a better approach.
The Solution: Custom Split Payment System
Instead of using Paystack's split feature, I built a system that:
1. Collects the full payment amount into FlexDown's main account
2. Calculates each party's share based on property type, agent involvement, and commission agreements
3. Initiates individual transfers to subaccounts using Paystack's Transfer API
4. Handles failures, retries, and reconciliation
5. Sends payment confirmations to all parties
Real Estate Use Cases: The Complexity
Real estate transactions aren't one-size-fits-all. Here are three actual scenarios from FlexDown that made custom splits necessary:
Use Case 1: Direct Property Sale (Owner-Listed)
Scenario: Property owner lists their GH₵500,000 house directly on FlexDown. No agent involved.
Split Logic:
• Property Owner: GH₵485,000 (97%)
• FlexDown Platform Fee: GH₵15,000 (3%)
Why 2-way split works: Simple, clean transaction. Owner gets maximum value, platform gets service fee for facilitating the transaction, managing listings, and providing buyer verification.
Use Case 2: Agent-Facilitated Sale
Scenario: A real estate agent lists a GH₵800,000 property on behalf of the owner. Agent negotiates, shows property, closes deal.
Split Logic:
• Property Owner: GH₵728,000 (91%)
• Agent Commission: GH₵56,000 (7%)
• FlexDown Platform Fee: GH₵16,000 (2%)
Complexity: Agent commission percentage varies based on their agreement with the owner (5-10% is typical). Our system reads this from the property listing metadata and calculates dynamically.
Use Case 3: Co-Agent Sale with Third-Party Services
Scenario: GH₵1,200,000 commercial property. Two agents involved (listing agent and buyer's agent). Legal fees for title transfer. Property inspection required.
Split Logic:
• Property Owner: GH₵1,062,000 (88.5%)
• Listing Agent: GH₵48,000 (4%)
• Buyer's Agent: GH₵36,000 (3%)
• Legal Services: GH₵30,000 (2.5%)
• FlexDown Platform: GH₵24,000 (2%)
The Challenge: This is a 5-way split with different payout timings. Legal fees and inspection costs are paid immediately. Agent commissions wait for title transfer completion. Owner payment is held in escrow until all conditions are met.
Paystack's split payment feature couldn't handle these nuanced scenarios, especially use case 3 with conditional payouts and different timing requirements.
Architecture Overview
Payment Collection: When a customer pays, the full amount goes into our main Paystack account. Single transaction, single fee (1.5% + ₦100).
Split Calculation Engine: A service that calculates each party's share based on business rules. This is configurable and can handle complex scenarios like tiered commissions or dynamic splits.
Transfer Queue: Uses a job queue (I used Bull with Redis) to handle asynchronous transfers. This prevents blocking the main payment flow and allows for retries.
Transfer Execution: Uses Paystack's Transfer API to send money to each subaccount. Transfers are batched where possible to reduce API calls.
Reconciliation Service: Tracks all transfers, handles failures, and ensures every payment is properly distributed.
Implementation Details
Here's the high-level flow:
// 1. Customer makes payment
paymentWebhook → validatePayment() → calculateSplits() → queueTransfers()
// 2. Transfer processor
processQueue() → batchTransfers() → executeTransfers() → updateRecords()
// 3. Handle webhooks
transferWebhook → updateTransferStatus() → retryIfFailed()
Key Considerations:
• Timing: Transfers happen within 2-5 minutes of payment confirmation. Acceptable for most use cases.
• Failure Handling: Automatic retries with exponential backoff. Manual intervention dashboard for stuck transfers.
• Reconciliation: Daily automated reconciliation reports. Alerts for any discrepancies.
• Testing: Extensive tests for edge cases: partial failures, network timeouts, duplicate webhooks.
Cost Comparison
Example: GH₵800,000 agent-facilitated property sale (3-way split)
Using Paystack Split Payments:
• Transaction fee: GH₵2,000 (capped at 1.5%)
• Split fees: GH₵150 (GH₵50 × 3 subaccounts)
• Total fees: GH₵2,150
Using Custom Solution:
• Transaction fee: GH₵2,000 (capped at 1.5%)
• Transfer fees: GH₵30 (GH₵10 flat fee per transfer, 3 transfers)
• Total fees: GH₵2,030
Savings: GH₵120 per transaction (5.6% reduction)
At scale (100 property transactions/month at average GH₵600,000): That's GH₵12,000 saved monthly, GH₵144,000 annually.
But the real savings come from larger, more complex transactions:
Example: GH₵1,200,000 commercial property (5-way split - Use Case 3)
Using Paystack Split Payments:
• Transaction fee: GH₵2,000 (capped)
• Split fees: GH₵250 (GH₵50 × 5 subaccounts)
• Total fees: GH₵2,250
Using Custom Solution:
• Transaction fee: GH₵2,000 (capped)
• Transfer fees: GH₵50 (GH₵10 × 5 transfers)
• Total fees: GH₵2,050
Savings: GH₵200 per transaction (8.9% reduction)
For FlexDown, processing just 50 complex commercial transactions annually saves GH₵10,000. Combined with residential transactions, we're looking at GH₵150,000+ in annual savings.
Trade-offs and Considerations
Pros of Custom Solution:
- Significantly lower costs at scale
- Full control over split logic and timing
- Better visibility and debugging capabilities
- Can implement custom business rules easily
Cons of Custom Solution:
- More complex codebase to maintain
- Need to handle edge cases and failures yourself
- Requires proper monitoring and alerting
- Initial development time investment
When Should You Build vs Buy?
Use Paystack Split Payments if:
• You're just starting out and need to move fast
• Transaction volume is very low (< 20 properties/year)
• You don't have engineering resources for custom solutions
• All your transactions follow the same simple split pattern
• You need instant, atomic splits
Build Custom Solution if:
• Processing 50+ property transactions annually
• Need flexible split logic (agents, co-agents, third parties)
• Require conditional payouts or escrow functionality
• 2-5 minute settlement delay is acceptable
• Have engineering capacity for implementation and maintenance
• Want detailed analytics and reporting on payment flows
Lessons Learned
Start Simple: I initially over-engineered the solution. The first version had too many abstractions. Keep it simple and iterate.
Monitoring is Critical: Set up proper alerts for failed transfers, unusual patterns, and reconciliation mismatches from day one.
Test Edge Cases: Network timeouts, duplicate webhooks, partial failures - test everything. Payments are not the place to discover bugs in production.
Document Everything: Future you (and your team) will thank you. Document the split logic, failure scenarios, and how to handle manual interventions.
Results
After 6 months running FlexDown's custom payment system:
- 99.7% successful transfer rate
- Average settlement time: 4 minutes
- GH₵84,000 saved in transaction fees
- Successfully handled complex 5-way splits for commercial properties
- Zero disputes related to payment distribution
- Built-in escrow functionality for buyer protection
- 3 hours/week maintenance time
Conclusion
Building a custom split payment system for FlexDown wasn't just about cost savings - it was about having the flexibility to handle Ghana's complex real estate transaction patterns. From simple owner-to-buyer sales to multi-party commercial deals with escrow and conditional payouts, we needed control that Paystack's standard split feature couldn't provide.
The best part? Once it's built and battle-tested, it becomes a competitive advantage. Lower costs mean better margins, and flexible payment logic means we can support transaction types that other platforms can't.
For any proptech or fintech builders in Ghana considering similar systems - the engineering investment pays for itself surprisingly quickly, especially if you're dealing with high-value transactions.
If you're building something similar or have questions about handling payment splits for real estate, feel free to reach out. Always happy to discuss payment systems and fintech architecture!
Note: All cost figures are based on current Paystack Ghana pricing as of January 2025. Transaction fees are in Ghana Cedis (GH₵). Always verify current rates and fees before making architectural decisions.