Design Real-Time Purchase Notifications for Every Card Swipe

Last updated: November 29, 2026

Quick Overview

Design the system that sends a push notification to the customer within a couple of seconds of every approved or declined card purchase, with merchant name, amount and remaining limit, for a customer base of over 100 million.

Nubank
System Design
Software Engineer
Nubank
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the system that sends a push notification to the customer within a couple of seconds of every approved or declined card purchase, with merchant name, amount and remaining limit, for a customer base of over 100 million.

The instant purchase notification is one of the experiences Nubank customers associate with the brand, and it doubles as a fraud signal when the customer did not make the purchase. The interviewer looks for a clean event-driven design on Kafka, sensible ordering and deduplication, and graceful behavior when push providers are slow.

What the Interviewer Expects
  • Triggers from the authorization event stream, not by polling
  • Enriches with merchant display name and remaining limit without slowing authorization
  • Dedupes so a retried event does not send two pushes
  • Handles APNs and FCM rate limits, token expiry and retries
  • Separates the in-app feed (durable) from the push (best effort)
  • Gives latency and throughput estimates
Key Topics to Cover
event-driven architecture
Kafka
push delivery
deduplication
enrichment
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Two purchases happen in the same second. Do you guarantee order on the device?
  • How would you localize for Portuguese, Spanish and English and support Mexico and Colombia?
  • How would you let a customer tap 'I did not make this purchase' and block the card from the notification?
  • What do you do during a push provider outage?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: notify on approved and declined authorizations, show merchant, amount, installments and available limit, deep link into the purchase. Non-functional: p95 under 2 to 3 seconds from authoriz...

High-Level Design

Authorizer publishes card.authorization.decided to Kafka keyed by account. Notification composer consumers enrich the event (merchant name cleaning, limit snapshot already present in the event),...


Submit Your Answer
Markdown supported

Related Questions