PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Coinbase

Extend a Banking Interface with Scheduled Payments and Account Merges

Last updated: Jul 25, 2026

Quick Overview

Design scheduled payments and account merging behind a stable banking interface. The discussion centers on deterministic execution order, idempotent requests, insufficient-funds behavior, atomic balance invariants, retired account identities, cancellation races, audit history, and crash-safe recovery.

  • hard
  • Coinbase
  • Software Engineering Fundamentals
  • Software Engineer

Extend a Banking Interface with Scheduled Payments and Account Merges

Company: Coinbase

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Technical Screen

# Extend a Banking Interface with Scheduled Payments and Account Merges You maintain an in-memory banking service whose public interface already supports creating accounts and recording balance-changing transactions. Extend the interface without exposing internal storage details. Assume every request carries a unique request ID and a logical integer timestamp. Requests are processed in increasing timestamp order. Monetary values are non-negative integer cents, and an operation that would overdraw an account must fail without changing state. At each timestamp, process scheduled payments due at that time before processing an explicitly submitted operation with that timestamp. Process multiple due payments in their creation order. A scheduled payment that lacks sufficient funds at execution time fails permanently without changing the balance. ### Clarifying Questions to Ask - How will creation order be represented so equal-time payments execute deterministically? - What should happen to pending payments when either account is merged? - Must old account IDs remain queryable after a merge? - Which failures must be idempotent when a request is retried? ### Part 1: Scheduled Payments Design interface methods to schedule a payment that debits a specified amount from one account at a future timestamp, cancel a pending payment, and process payments when their execution time arrives. Define identifiers, validation, ordering, insufficient-funds behavior, and retry semantics. #### What This Part Should Cover - A precise API contract and explicit state transitions - Stable ordering for payments due at the same time - Idempotent request handling and safe cancellation races - Efficient discovery of due payments without scanning every account ### Part 2: Account Merges Design a merge operation that combines two accounts while preserving the surviving account's history and correctly reconciling balances and pending scheduled payments. Explain how subsequent requests using the retired account ID behave. #### What This Part Should Cover - Atomicity and invariants for balances and account identity - A documented policy for pending payments owned by the retired account - Historical lookup and alias or tombstone behavior - Concurrency control for merges racing with other operations ### What a Strong Answer Covers - Clear separation between the public interface, domain state, and scheduling mechanism - Deterministic ordering, idempotency, and failure semantics - Atomic transitions that never create or destroy money accidentally - Tests for boundary timestamps, retries, insufficient funds, cancellation, and merge races ### Follow-up Questions - How would the design change if requests can arrive out of timestamp order? - How would you persist the state and recover scheduled work after a crash? - What information would you retain for an auditable transaction history? - How would you prevent two workers from executing the same payment?

Quick Answer: Design scheduled payments and account merging behind a stable banking interface. The discussion centers on deterministic execution order, idempotent requests, insufficient-funds behavior, atomic balance invariants, retired account identities, cancellation races, audit history, and crash-safe recovery.

Related Interview Questions

  • Evolve Cursor Pagination Without Breaking Clients - Coinbase (medium)
  • Debug and Extend Cursor Queries - Coinbase (hard)
  • Design a task management system with TTL - Coinbase (medium)
  • Implement a blog feed with fetching and state - Coinbase (medium)
|Home/Software Engineering Fundamentals/Coinbase

Extend a Banking Interface with Scheduled Payments and Account Merges

Coinbase logo
Coinbase
Jul 16, 2026, 12:00 AM
hardSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
1
0

Extend a Banking Interface with Scheduled Payments and Account Merges

You maintain an in-memory banking service whose public interface already supports creating accounts and recording balance-changing transactions. Extend the interface without exposing internal storage details.

Assume every request carries a unique request ID and a logical integer timestamp. Requests are processed in increasing timestamp order. Monetary values are non-negative integer cents, and an operation that would overdraw an account must fail without changing state.

At each timestamp, process scheduled payments due at that time before processing an explicitly submitted operation with that timestamp. Process multiple due payments in their creation order. A scheduled payment that lacks sufficient funds at execution time fails permanently without changing the balance.

Clarifying Questions to Ask Guidance

  • How will creation order be represented so equal-time payments execute deterministically?
  • What should happen to pending payments when either account is merged?
  • Must old account IDs remain queryable after a merge?
  • Which failures must be idempotent when a request is retried?

Part 1: Scheduled Payments

Design interface methods to schedule a payment that debits a specified amount from one account at a future timestamp, cancel a pending payment, and process payments when their execution time arrives. Define identifiers, validation, ordering, insufficient-funds behavior, and retry semantics.

What This Part Should Cover Guidance

  • A precise API contract and explicit state transitions
  • Stable ordering for payments due at the same time
  • Idempotent request handling and safe cancellation races
  • Efficient discovery of due payments without scanning every account

Part 2: Account Merges

Design a merge operation that combines two accounts while preserving the surviving account's history and correctly reconciling balances and pending scheduled payments. Explain how subsequent requests using the retired account ID behave.

What This Part Should Cover Guidance

  • Atomicity and invariants for balances and account identity
  • A documented policy for pending payments owned by the retired account
  • Historical lookup and alias or tombstone behavior
  • Concurrency control for merges racing with other operations

What a Strong Answer Covers Guidance

  • Clear separation between the public interface, domain state, and scheduling mechanism
  • Deterministic ordering, idempotency, and failure semantics
  • Atomic transitions that never create or destroy money accidentally
  • Tests for boundary timestamps, retries, insufficient funds, cancellation, and merge races

Follow-up Questions Guidance

  • How would the design change if requests can arrive out of timestamp order?
  • How would you persist the state and recover scheduled work after a crash?
  • What information would you retain for an auditable transaction history?
  • How would you prevent two workers from executing the same payment?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.