← Lessons

quiz vs the machine

Platinum1830

System Design

Dispute and Chargeback Flows

Modeling the lifecycle when a cardholder contests a charge and funds are clawed back.

5 min read · advanced · beat Platinum to climb

What a chargeback is

A chargeback happens when a cardholder disputes a charge with their bank. The bank claws back the funds from the merchant while the dispute is investigated, often before any fault is decided.

The lifecycle

  • A dispute is opened and funds are provisionally withdrawn.
  • The merchant submits evidence to contest it.
  • The bank rules, and the merchant either wins and recovers funds or loses them, sometimes plus a fee.

System design notes

  • Model the dispute as its own state machine linked to the original payment.
  • Post the withdrawal and any later reversal to the ledger so balances reflect reality immediately.
  • Track deadlines for submitting evidence, since missing one forfeits the case.
  • Watch chargeback rate, because exceeding processor thresholds risks penalties.

Key idea

A chargeback flow tracks a contested charge through opening, fund withdrawal, evidence, and resolution, modeled as a linked state machine with ledger entries and strict response deadlines.

Check yourself

Answer to earn rating on the learn ladder.

1. What happens to funds when a chargeback is opened?

2. Why track evidence submission deadlines?