Big Circle · D360 · Production
D360 rewards and payouts
Rewards, referrals and bank payouts for around 5,000 users, where a retried payout is recorded once.
- Role
- Backend engineer, Big Circle
- Area
- Payments
- Stack
- FastAPI, Node.js, TypeScript, PostgreSQL, OAuth2, mTLS
The short version
D360 lets users earn rewards and referral bonuses and cash them out to their bank. I built the payment, rewards and referral workflows and integrated a Banking as a Service provider for IBAN payouts, so money moves once and failures are handled rather than lost.
The problem
Users earn rewards and referral bonuses, then cash them out to their bank. A payout that fails silently, or goes out twice, costs real money and trust.
What I did
I integrated a Banking as a Service provider for IBAN payouts over OAuth2 with mutual TLS, routed every webhook through an event ledger so a retried event is recorded once, and guarded the payout ledger with single transaction debits and database constraints.
What it protects now
Payouts reach the bank once, failures are handled and visible, and balances stay correct.
How it is built
- IBAN payouts through a Banking as a Service provider, authenticated with OAuth2 over mutual TLS
- HMAC SHA256 request signing on every call to the provider
- Idempotent webhook ingestion through an event ledger, so a retried event is recorded once
- Payout ledger hardened against double payments and double refunds with single transaction debits, SELECT FOR UPDATE status transitions and EXCLUDE constraints
- Payment failure handling, balance management and automated reward distribution
- API level authentication, validation and rate limiting, with Firebase push notifications
- FastAPI
- Node.js
- TypeScript
- PostgreSQL
- OAuth2
- mTLS
- Firebase
- Sentry
- Docker