Case study 02 · Fintech · Earnings & payouts
Earnings & payout engine for a US fintech rewards platform
A multi-level referral network, an earnings engine and ledger-style payouts — rolled out white-label for a Latin American distributor.
The problem
A rewards and referral platform pays members for referrals across several levels of the network they build. Every earning had to be calculated correctly, every payout had to be traceable, and the platform had to launch for new distributors under their own brand.
My role
I grew into leading the backend. I modelled the referral network, built the earnings engine, ledger-style transactions and payouts, and led the multi-tenant white-label rollout for a Latin American distributor — working directly with the client on technical design and coordinating the team's delivery.
Architecture
My scopeDecisions, explained belowKey decisions
Money as a ledger, not a balance. Every earning and payout is recorded as a credit or debit entry and balances are derived from them, so every amount can be traced back to where it came from.
Heavy work off the request path. Celery runs earnings calculation, payouts and notifications in the background, so API requests stay fast and predictable.
A referral model built for multi-level earnings. The referral network is modelled in PostgreSQL so earnings can be calculated across several levels of a member's network.
One platform, many brands. Multi-tenant white-label support let a Latin American distributor launch under its own brand on the same codebase.
Result
- white-label launch for a Latin American distributor
- Multi-tenant
- every earning and payout recorded as a ledger entry
- Traceable
- grew from backend engineer to backend lead on the platform
- Lead