PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/OpenAI

Design a scalable payment system

Last updated: Jun 15, 2026

Quick Overview

An OpenAI software-engineer system-design screen: design a scalable payment system covering both peer-to-peer wallet transfers and merchant card/digital-wallet payments. It evaluates double-entry ledger design, idempotency and exactly-once/no-double-spend semantics, authorize/capture/refund flows, PCI tokenization, fraud/risk controls, reconciliation and settlement, and scalability, availability, and observability trade-offs.

  • hard
  • OpenAI
  • System Design
  • Software Engineer

Design a scalable payment system

Company: OpenAI

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

##### Question Design a scalable payment system. The system must support both peer-to-peer money movement between users and merchant payments (accepting card and digital-wallet payments), with refunds, chargebacks, and full transaction history. Assume it may integrate with external payment rails/providers (card networks, bank transfers). Cover the following: 1. **Core product requirements:** user-to-user (wallet-to-wallet) transfers, merchant card/digital-wallet payments, refunds, chargebacks/disputes, payment status tracking, and per-user/merchant transaction history. 2. **API design:** key endpoints (authorize, capture, refund, void, create-payment, get-payment), request/response fields, idempotency keys, and exactly-once charge semantics (no double-spend). 3. **Money-movement model:** a double-entry ledger; authorization vs capture, holds/reservations, settlement, and reconciliation; how you represent accounts, balances, and transactions. 4. **End-to-end flow & PCI scope:** the flow across gateway, acquirer, card networks, and issuers; tokenization and the PCI scope boundary; how digital wallets (Apple Pay / Google Pay) are handled. 5. **Risk & fraud controls:** 3DS/SCA, risk scoring, velocity limits, sanctions/AML/KYC hooks, and optional ML integration. 6. **Data model & storage:** transactions, ledger entries, settlements, chargebacks, idempotency keys, and immutable audit logs. 7. **Consistency & failure handling:** consistency model, deduplication, retries, exactly-once vs at-least-once processing, and orchestration patterns (outbox / SAGA) for multi-step workflows. 8. **Settlement & reconciliation:** matching the internal ledger against acquirer/provider settlement files, currency conversion, fees, and scheduled payouts. 9. **Scalability & resilience:** throughput targets (e.g., thousands of TPS, p99 latency < 200 ms), backpressure/queueing, high availability, and disaster recovery (multi-region, RPO/RTO). 10. **Security, privacy & observability:** authentication/authorization, encryption, key management, PII/GDPR handling, metrics/tracing/log correlation, and a testing strategy with simulators for external partners. Explain the key trade-offs and provide a high-level architecture (in words).

Quick Answer: An OpenAI software-engineer system-design screen: design a scalable payment system covering both peer-to-peer wallet transfers and merchant card/digital-wallet payments. It evaluates double-entry ledger design, idempotency and exactly-once/no-double-spend semantics, authorize/capture/refund flows, PCI tokenization, fraud/risk controls, reconciliation and settlement, and scalability, availability, and observability trade-offs.

Related Interview Questions

  • Design Video Generation Orchestration - OpenAI (medium)
  • Design CI/CD Build Caching - OpenAI
  • Design an Instagram-like Feed System - OpenAI (medium)
  • Design Online Chess Matchmaking - OpenAI (hard)
  • Design Android MVVM API Architecture - OpenAI (medium)
OpenAI logo
OpenAI
Jul 15, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
38
0
Question

Design a scalable payment system. The system must support both peer-to-peer money movement between users and merchant payments (accepting card and digital-wallet payments), with refunds, chargebacks, and full transaction history. Assume it may integrate with external payment rails/providers (card networks, bank transfers).

Cover the following:

  1. Core product requirements: user-to-user (wallet-to-wallet) transfers, merchant card/digital-wallet payments, refunds, chargebacks/disputes, payment status tracking, and per-user/merchant transaction history.
  2. API design: key endpoints (authorize, capture, refund, void, create-payment, get-payment), request/response fields, idempotency keys, and exactly-once charge semantics (no double-spend).
  3. Money-movement model: a double-entry ledger; authorization vs capture, holds/reservations, settlement, and reconciliation; how you represent accounts, balances, and transactions.
  4. End-to-end flow & PCI scope: the flow across gateway, acquirer, card networks, and issuers; tokenization and the PCI scope boundary; how digital wallets (Apple Pay / Google Pay) are handled.
  5. Risk & fraud controls: 3DS/SCA, risk scoring, velocity limits, sanctions/AML/KYC hooks, and optional ML integration.
  6. Data model & storage: transactions, ledger entries, settlements, chargebacks, idempotency keys, and immutable audit logs.
  7. Consistency & failure handling: consistency model, deduplication, retries, exactly-once vs at-least-once processing, and orchestration patterns (outbox / SAGA) for multi-step workflows.
  8. Settlement & reconciliation: matching the internal ledger against acquirer/provider settlement files, currency conversion, fees, and scheduled payouts.
  9. Scalability & resilience: throughput targets (e.g., thousands of TPS, p99 latency < 200 ms), backpressure/queueing, high availability, and disaster recovery (multi-region, RPO/RTO).
  10. Security, privacy & observability: authentication/authorization, encryption, key management, PII/GDPR handling, metrics/tracing/log correlation, and a testing strategy with simulators for external partners.

Explain the key trade-offs and provide a high-level architecture (in words).

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More OpenAI•More Software Engineer•OpenAI Software Engineer•OpenAI System Design•Software Engineer System Design
PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL 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.