← Questions

Model a business identity verification (KYC) workflow

0
StripeOO designLast asked Mar 2026

An object-oriented design interview question asked in Stripe's technical phone screen, last asked Mar 2026. It tests object-oriented design, state machines and kyc.

Design the object model for verifying a business before it can accept payments (know-your-customer, KYC). A business applies with its identity details and supporting documents. A verification policy, chosen by the business's country and business type, decides which checks are required: for example business identity, representative identity, address and tax information. You design the classes, their interfaces and how they collaborate; you do not need to implement them.

Requirements

  • Functional:
    • Create an application for a business; the policy for its country and type sets the required checks.
    • Attach evidence (a document or a data submission) to a check.
    • Record a review result for a piece of evidence: verified or rejected.
    • Read the current decision for the application.
  • Rules:
    • Every check starts PENDING and becomes VERIFIED or REJECTED after its evidence is reviewed.
    • The application is VERIFIED only when every required check is verified, and REJECTED as soon as any required check is rejected; otherwise it is PENDING.
    • A rejected check can receive replacement evidence, which sends it back to PENDING.
    • Every review result names the evidence it reviewed. A result for evidence that has since been replaced is stale and must not change the check.
  • Non-functional: one process, in memory. User interfaces, outside verification vendors, document bytes, networking and storing policies are out of scope.

Clarifying questions

  • Can the policy change while an application is in progress? Does an application keep the policy it started with?
  • Can one check have several pieces of evidence at once, or only the current one?
  • Can a verified check be re-opened (for example, when a document expires)?
  • Is a rejected application final, or can it become verified after fixes?
  • Who calls record_result, and do we need an audit trail of every result?

What a strong answer covers

  • The main classes: Application (business, policy, checks, decision), VerificationPolicy (selected by country and business type, lists CheckTypes), Check (type, status, current evidence), Evidence (id, check, submitted data or document reference, version), ReviewResult (evidence id, outcome, reason), and a PolicyRegistry that looks up the policy.
  • The interfaces, for example create_application(business) -> Application, attach_evidence(application_id, check_type, evidence) -> evidence_id, record_result(evidence_id, outcome) -> bool, decision(application_id) -> Status.
  • The state machine of a check and the rule that derives the application's decision from its checks (computed, not stored separately, or updated in one place).
  • Stale results: compare the result's evidence id (or version) with the check's current evidence and ignore it if they differ.
  • Where invariants live (inside Check and Application, not in callers) and how the design stays open to new check types and countries.
  • Thread safety if results can arrive concurrently.

Follow-ups

  • Add a check that needs two reviewers to agree.
  • Some checks are optional in one country and required in another. How does the policy express that?
  • Add a full audit history of every status change.
  • An external vendor now does the reviews asynchronously. What changes in the model?

Where it's asked

  • Stripe · Technical phone screen · Last asked Mar 202660 min · One realistic task in parts, in a project editor (CoderPad project mode or HackerRank Projects) with several files and tests

What it tests

object-oriented design · state machines · kyc

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing