← Roblox Interview InsightsSoftware Engineer

Roblox·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

Roblox system design round, one big question about deferred payment flows. Pretty intense scope for a single session, they really wanted you to go deep on every layer rather than just sketch a high-level diagram.

Questions Asked (1)

Q1

Design a payment hold system that authorizes funds at one time and either captures or releases them later. Cover the full flow with payment providers, how you'd schedule and retry capture/expiry jobs, partial captures, refunds, reconciliation between your internal ledger and provider state, and how you guarantee exactly-once semantics for the eventual capture.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This question is basically five questions stapled together.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design the core state machine for authorizations, captures, and releases. Walk through the full lifecycle including provider integration, job scheduling, partial captures, refunds, reconciliation, and exactly-once guarantees. Emphasize idempotency, distributed transactions, and failure handling.

Pro tip: Use idempotency keys for every provider operation and design your internal ledger as the source of truth with a reconciliation process that can repair discrepancies. This shows you understand real-world payment system reliability.

1. Clarify Requirements and Scope

Ask about scale, supported payment providers, expected latency, and consistency requirements. Define the core entities: authorization, capture, release, refund, and ledger entries.

2. Design the State Machine and Data Model

Model the lifecycle of a payment hold: authorized, partially captured, captured, released, expired, refunded. Define database tables for holds, transactions, and ledger entries with appropriate statuses and timestamps.

3. Integrate with Payment Providers

Abstract provider APIs behind an interface. Use idempotency keys for all mutating calls. Handle provider-specific quirks like authorization expiry windows and partial capture support.

4. Schedule and Retry Capture/Expiry Jobs

Use a durable job queue (e.g., with exponential backoff) to schedule captures before authorization expiry and to release funds if not captured. Ensure jobs are idempotent and can be safely retried.

5. Ensure Exactly-Once Semantics and Reconciliation

Implement exactly-once capture via idempotency keys and a two-phase commit-like protocol: record intent, call provider, update state. Run periodic reconciliation to compare internal ledger with provider reports and fix discrepancies.

Key Points to Mention

  • Idempotency keys for all provider operations to prevent duplicate captures/refunds
  • State machine for payment holds with clear transitions and error states
  • Partial captures: how to handle multiple captures against a single authorization and update remaining amount
  • Job scheduling with exponential backoff and dead-letter queues for capture/expiry
  • Reconciliation process: daily settlement reports, discrepancy detection, and automated repair
  • Exactly-once semantics via idempotency, transactional outbox pattern, and distributed locking

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.