Design Offline Card Payments for a Point of Sale App
Last updated: November 29, 2026
Quick Overview
Design how a Square Point of Sale device keeps taking card payments when its internet connection drops, stores them securely, and forwards them for authorization when connectivity returns, without double charging or losing payments.
Square
November 29, 20260
0
0 solved
Design how a Square Point of Sale device keeps taking card payments when its internet connection drops, stores them securely, and forwards them for authorization when connectivity returns, without double charging or losing payments.
Square Point of Sale offers an offline payments mode so a food truck or market stall keeps selling when Wi-Fi fails, with the seller accepting the risk of later declines. A system design round here tests mobile and backend thinking together: secure local storage, exactly-once upload, risk limits and clear seller-facing states.
What the Interviewer Expects
- Clarify risk ownership and offline limits (amount, time window)
- Encrypt card data on device and never store it in plaintext
- Assign a client-generated id per payment for idempotent upload
- Design the sync protocol and server-side dedupe
- Handle declines after the fact and notify the seller
- Cover device loss, app kill, and clock issues
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you decide per-seller offline limits?
- What happens if the device is lost with 40 unsynced payments?
- How would you show the seller which payments are still pending?
- How do Orders, inventory and receipts reconcile once payments sync?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: accept tap, dip or swipe while offline; show a pending state; upload automatically when online; surface declines. Non-functional: no lost payments even if the app is killed; no duplicates;...
High-Level Design
Reader hardware encrypts card data with a key only Square's backend can decrypt (the phone never sees plaintext). The app writes each offline payment to a durable local queue (SQLite with WAL) with a ...