Katkat

Design Monthly Artist Payouts from Streaming Counts

CommureSoftware Engineer · Technical Screen

Last updated

Design a monthly artist-payout system that turns valid streaming events into reproducible obligations and idempotent external payments. The answer covers event deduplication, period closure, payout versions, timeout ambiguity, outbox delivery, provider reconciliation, late adjustments, and auditable financial state.

Design Monthly Artist Payouts from Streaming Counts

Design a system for an audio platform that counts valid streams, aggregates them by artist, calculates each artist's monthly payout, and sends payments through an external payment provider. Payment requests must use idempotency keys so retries cannot pay an artist twice.

Define assumptions about stream validity and the payout formula. Cover event ingestion, deduplication, monthly window closure, count corrections, calculation records, payment state transitions, external-provider retries, reconciliation, and auditability.

Clarifying Questions to Ask

  • What makes a stream billable, and can fraud or rights corrections arrive after month end?
  • Is the payout a fixed rate per valid stream or an artist-specific contract?
  • When is a month considered final, and are adjustments paid in a later cycle?
  • What guarantees and webhook behavior does the external provider offer?

Follow-up questions

  • How would you correct an overpayment discovered after settlement?
  • What happens when the provider times out after accepting a payment request?
  • How would an artist dispute a stream count while preserving an auditable history?