Case study

SkyBiz Payouts

Payments back office with risk review

1 payout per withdrawalin tests, even with retried jobs and webhooksat-least-once delivery with idempotent consumers (single effect)

Live demo

No public demo yet: it is an internal back office.

What it is and what it solves

A payments back office: deposits through Stripe (test mode) and a crypto simulator, withdrawals with risk scoring and manual review, reconciliation and AI-assisted promotions (multilingual drafts approved by an operator). It moves money in and out of Platform Core with reliable jobs and an auditable event trail.

Business version: SkyBiz →

Architecture

SkyBiz Payouts: architecturejobsdeposit · withdrawoutboxBack officereview · reconciliationPayouts APIRabbitMQTTL retries · DLQ · VIPWorkersrisk · payoutsPostgreSQLStripe (test)crypto simulatorPlatform CoreKafkaevents
  • Back office → Payouts API
  • Payouts API → RabbitMQ (jobs)
  • RabbitMQ → Workers
  • Workers → Stripe (test)
  • Workers → Platform Core (deposit · withdraw)
  • Workers → PostgreSQL
  • PostgreSQL → Kafka (outbox)

Simplified from the project description; the repository is private.

Three technical decisions

  1. RabbitMQ for jobs, Kafka for events

    Jobs go to RabbitMQ (TTL retries, dead-letter queue, VIP priority, manual ack) with at-least-once delivery and idempotent consumers, so each request has a single effect. Facts other services subscribe to leave through a transactional outbox to Kafka.

  2. Risk scoring with a human in the loop

    Withdrawals are scored and the risky ones wait for manual review, so automation speeds up the normal case without approving the dangerous one.

  3. Reconciliation as a feature

    Provider records and the ledger are compared on purpose, so any mismatch is surfaced instead of discovered later.

Tests, with numbers

  • 57 tests against real PostgreSQL and RabbitMQ.
  • 7 faults injected on purpose, all detected — for example a worker killed mid-job, a message that exhausted its retries and a duplicated webhook.

Verified

  • Integrated with Platform Core.

Not claimed

  • Stripe runs in test mode; crypto is simulated.
  • Figures come from test runs, not from production traffic.

Stack

  • NestJS
  • PostgreSQL
  • RabbitMQ
  • Kafka
  • Stripe (test)
  • Docker

Private repository · code walkthrough on request