Clarify the payment flow
Separate authorization, capture, settlement, payout, and refunds so you know which transitions require strong guarantees.
Free Stripe breakdown
Stripe is one of the clearest ways to tell whether a candidate understands correctness or just knows infrastructure nouns. Strong answers start with what must never go wrong before they start naming queues or databases.
The pivot
Weak Stripe answers jump to a queue, payment gateway, and database. Strong answers start by protecting the invariants: a payment should not be created twice, balances should not drift, and retries should not duplicate money movement.
Separate authorization, capture, settlement, payout, and refunds so you know which transitions require strong guarantees.
Every client retry and webhook retry should map back to the same logical payment operation instead of creating duplicates.
Treat balance updates like accounting entries, not mutable counters you can patch later.
30-second answer shape
“I want strong correctness around payment creation, ledger writes, and state transitions, even if some downstream notifications are eventually consistent.”
“I would persist the payment request once, enforce idempotency on the write path, and treat the ledger as append-only.”
“I accept some latency and workflow complexity in exchange for never double-charging or letting balances drift.”
Common mistake
“We have an API gateway, Redis cache, Kafka, and a relational database.” That sounds like infrastructure, not judgment.
“The hard part is preventing duplicate money movement while preserving a clean audit trail through retries and downstream failures.”
The interviewer immediately hears that you understand the business boundary the system exists to protect.
Want the full version?
The full breakdown covers authorizations, captures, settlements, webhooks, ledger modeling, retries, payouts, and how to answer follow-up questions without drifting off the real problem.