Custom Multi-Platform Revenue Split System

Architecture Diagram

Role: Software Developer Intern
Duration: Feb 2024 – June 2024
Company: Techrupt Innovations
Stack:

Django Stripe PayPal WooCommerce Shopify TikTok APIs PHP WordPress GitHub Actions

Project Overview

Techrupt previously relied on a WooCommerce plugin that charged a recurring fee and supported only Stripe-based 2-party splits. As Techrupt’s eCommerce business scaled to include platforms like TikTok Shop and Shopify, this plugin became a bottleneck due to lack of extensibility and cost overhead. I built a custom backend revenue split system from scratch that removed plugin dependencies, handled PayPal and Stripe equally well, and scaled across new platforms.

Problem Statement

The third-party plugin was limited in functionality, expensive ($1,200/year), and incompatible with new platform requirements. It restricted the company’s ability to automate revenue splits across vendors, platforms, and affiliates. As Techrupt adopted a commission-based model across multiple storefronts, a more robust internal system became necessary.

  • Automate commission-based revenue splits across multiple payment providers
  • Expand beyond Stripe-only plugins to TikTok Shop, Shopify, and Instagram Shop
  • Enable centralized control over commission rates
  • Reduce plugin costs and prevent errors from manual revenue tracking

Solution Design

Architecture & Ingestion

  • Developed custom plugins for Shopify and WooCommerce to append payment metadata including vendor ID and subtotals
  • Built a centralized Django backend to process incoming webhook events from Stripe, PayPal, and TikTok
  • Stripe Connect and PayPal Payouts APIs handled automated fund transfers post-payment
  • TikTok Shop orders were mapped to internal records using webhook events and product metadata

Revenue Split Flow

  • Captured payment success events using metadata-rich webhooks
  • Commission rules were calculated dynamically, including edge cases (e.g., coupons, taxes)
  • Stripe Connect was used to split payments across multiple connected accounts
  • Admins configured custom commission logic per client from a centralized panel
  • All payout records were logged for audit and analytics purposes

Results & Impact

  • Reduced plugin costs by over $1,200/year
  • Enabled revenue splitting across Stripe and PayPal without code duplication
  • Scaled to process over 5,000 webhook events daily with spikes during sale periods
  • Webhook processing latency remained under 100ms consistently

Implementation Highlights

  • Built sandbox workflows to test Stripe and PayPal payout logic in isolation
  • Bypassed TikTok Shop’s geoblocking using Azure VMs with VPN tunnels
  • GitHub Actions handled deployment workflows and webhook test automation

Key Learnings

  • Learned how to work with platform APIs including TikTok, Shopify, and WooCommerce
  • Got hands-on with Stripe Connect and PayPal’s payout systems
  • Built scalable webhook processors and metadata parsers from scratch
  • Ensuring metadata consistency across platform-specific formats
  • Handling payout exceptions due to cross-border regulations or currency conversion
  • Backfilling data accurately when webhooks failed or arrived late
  • Implement caching or batching to reduce DB writes during high traffic
  • Build a more dynamic commission logic editor for future updates