Sanjaay Gowda T S
American Express Company practice

ORIGINAL COMPANY-CONTEXT PRACTICE

Make a synthetic rewards ledger reversible

System designHardConcept

Original practice scenario: A fictional card program awards points for purchases, then handles refunds, charge corrections and partially redeemed rewards. Design its ledger.

Written for independent practice using company context; this is not a verified question from a company interview.

A REASONED APPROACH

Model answer.

Use immutable reward movements linked to the originating activity, with explicit reversal and redemption semantics. A mutable points balance alone cannot explain how a correction should affect prior awards.

Work through it

  1. Assign stable purchase and reward-event identifiers, version eligibility rules and make posting idempotent across repeated transaction notifications.
  2. Record awards, redemptions, expirations and compensating adjustments separately, defining what happens when a refund follows redemption under fictional program rules.
  3. Reconcile materialized balances to ledger totals and test partial refunds, duplicate events, late corrections and concurrent redemptions against declared invariants.

Tradeoffs to discuss

  • An append-only ledger improves auditability but requires careful policy for negative balances and corrections to historical rule versions.

Common pitfalls

  • Do not erase an award after it has affected later activity.
  • A refunded purchase and its reward reversal need independent, linked event identities.

KEEP PRACTISING

Related questions.

Keep learning beyond the interview.

Explore the Learning Hub