PhonePe software engineer interview questions and process
PhonePe software engineer interviews commonly include data structures and algorithms rounds, a machine coding or low-level design round, and for experienced engineers a system design round about consumer payments at very high volume: UPI transfers, merchant QR payments, transactions stuck in a pending state, rewards and transaction history. A hiring manager round on ownership and production experience usually closes the process.
By Evin JohnPublished 6 min read
How the PhonePe interview usually runs
PhonePe is a Bengaluru-based digital payments company best known for its UPI app, used for sending money to people, paying at shops by scanning QR codes, paying bills and recharging phones, with financial products such as insurance and investments alongside. It separated from Flipkart in recent years, and Walmart is its majority owner. PhonePe does not publish an interview script. Candidates most often describe the steps below, with variation by level and team.
- Online test or technical screen. Timed coding problems for campus and junior roles, a phone screen for others.
- Problem-solving rounds. One or two live rounds on data structures and algorithms.
- Machine coding or low-level design. Build or design a module with extensible classes in limited time.
- System design. For senior engineers, a high-scale consumer payments or platform problem.
- Hiring manager round. Your projects, decisions, incidents and motivation.
What the engineering problem looks like
UPI, operated by NPCI, connects apps like PhonePe to banks. A single transfer passes through the app, PhonePe's systems, NPCI and two banks, and any of them can be slow. The hardest moments are not failures but uncertainty: the money left one account and the app does not yet know if it arrived. Engineers have to show the user an honest status, resolve it automatically where possible, and never let a retry move money twice. Traffic also spikes around salary days, festivals and big sale events. Interviewers look for people who reason carefully about those edge states and about running services that must stay up.
Data structures and algorithms questions
| Question | What it tests | What a strong answer shows |
|---|---|---|
| Given a user's transactions, return the top three merchants by spend this month. | Hash maps and partial sorting. | Aggregation in one pass and a heap or sort for the top three. |
| Find pairs of transactions that cancel each other out (a payment and its reversal). | Hashing with a composite key. | Matching on amount, parties and reference, with time ordering. |
| Split a restaurant bill among friends where some items are shared. | Modeling and integer math. | Per-item shares, paise rounding that still sums to the total. |
| Find the longest period during which a wallet balance stayed above a threshold. | Prefix balances and windows. | A running balance and tracking the start of the current valid period. |
| Detect a cycle of transfers that returns money to the sender within a day. | Graph cycles. | DFS on a time-filtered graph, and why this matters for fraud checks. |
| Design a structure that returns the last n transactions of a user in constant time per insert. | Circular buffers. | A fixed-size ring with a head pointer, plus a store for full history. |
| Given bill due dates, return all bills due in the next k days, sorted. | Sorting and binary search. | Sorted dates with a binary search for the window boundaries. |
| Count distinct merchants a user paid in each sliding seven-day window. | Sliding window with counts. | A frequency map that adds and removes as the window moves. |
| Check whether a UPI-style handle is valid against simple rules. | String parsing. | One clear validation function, explicit rules and edge cases like repeated separators. |
| Return the k most recent unique payees from a long history. | Ordered sets. | Scan from newest, a set for seen payees, stop at k. |
Machine coding and low-level design questions
Show clear separation between domain objects, rules and storage, and make the next requirement cheap to add. If the round is a build, aim for a working core and a few test calls before any extras.
- Build a wallet with add money, pay, refund and a statement. Integer money, a transaction record for every change, and refunds tied to the original payment.
- Design a cashback and offers engine with per-user limits and campaign budgets. Eligibility rules as small objects, a budget counter that cannot go negative, and one offer per transaction unless stated.
- Build a split-the-bill feature that tracks who owes whom across a group. Net balances and settle-up suggestions.
- Design bill reminders for electricity, mobile and credit cards. Due-date scheduling, snoozing and avoiding duplicate reminders.
- Build a rewards scratch-card system with odds and daily caps. Configurable odds, a fair random source and caps enforced per user and globally.
- Design a transaction history service with filters by date, type and status. Pagination by cursor and an index plan.
- Build a simple fraud rule engine that blocks a payment when any rule fires. Rules as plugins, short-circuit evaluation and a reason code.
System design questions
Open with the actors (app, PhonePe services, NPCI, banks), the payment states and the scale. Then design for the slow path, not just the happy path. The payment system walk-through and rate limiter design are good groundwork.
| Prompt | What it tests | What a strong answer shows |
|---|---|---|
| Design the backend for a peer-to-peer UPI transfer. | End-to-end payment flow. | Request creation with an idempotent ID, a state machine, calls out to the switch, callbacks and timeouts. |
| Design how the app resolves transactions stuck in pending. | Uncertainty handling. | Status checks on a backoff schedule, a clear message to the user, and final resolution through reconciliation with bank and switch data. |
| Design transaction history for a very large user base. | Write-heavy storage and fast reads. | Partitioning by user, recent data in a fast store, older data archived, and cursor pagination. |
| Design merchant QR payments with instant confirmation to the shopkeeper. | Low-latency notifications. | A payment event fan-out to an app push, SMS or an audio device at the counter, with retries. |
| Design the offers and cashback platform for a festival campaign. | Spiky load and budget control. | Pre-computed eligibility, atomic budget counters, and graceful degradation when the campaign service is slow. |
| Design the notification system for payment alerts. | Fan-out with priorities. | Payment alerts ahead of marketing messages, deduplication and per-user rate limits. See notification system design. |
| Design for a full data center outage without losing payments. | Disaster recovery. | Active-active or active-passive setups, replication of the payment state and how in-flight requests are recovered. |
Hiring manager and behavioral questions
- Tell me about a time a system you owned behaved unexpectedly in production. Detection, your first action and the long-term fix.
- Describe a design decision you made for correctness at the cost of speed. Why correctness won and how you limited the cost.
- Tell me about working through a high-traffic event. Preparation, what you watched on the day and what you learned.
- How do you test code that moves money? Unit tests for rules, integration tests with stubs for banks, and reconciliation as the last safety net.
- Tell me about a time you simplified a system someone else built. What you removed, how you proved nothing broke and who you brought along.
- Why PhonePe? Something specific about consumer payments in India that you want to work on.
Fictional example
- Interviewer
- The bank debited the user, but we never got the final response. What does the user see and what does the system do?
- Candidate
- The user sees a pending status with a plain message that the money is safe and will either reach the receiver or come back, plus an expected time. We do not ask them to retry, because a retry could send the money twice.
- Candidate
- Behind it, the transaction stays in a pending state with its original reference. A worker checks status with the switch on a backoff schedule. If it resolves, we update the state and notify both sides. If it stays unresolved, it moves to reconciliation with the bank's settlement data, and the user is notified when the reversal or credit happens.
- Interviewer
- How do you stop two workers checking the same transaction?
- Candidate
- Each check takes a short lease on the transaction row, and every state update is conditional on the current state, so a late duplicate write fails harmlessly.
Four-week preparation plan
- Week 1: patternsHashing, sliding windows, graphs and heaps. Two timed problems a day with complexity said aloud.
- Week 2: machine codingBuild the wallet and the cashback engine end to end with tests for refunds, limits and budgets.
- Week 3: payments designPractice the P2P transfer, pending resolution and history designs. Learn the general UPI flow from NPCI's public material.
- Week 4: stories and mocksPrepare incident, correctness and high-traffic stories, then run two full mock loops.
For the merchant side of payments, read the Razorpay software engineer guide. For an e-commerce loop with a similar machine coding round, see the Flipkart software engineer guide.
Natively is a handy rehearsal tool for this loop. It transcribes a mock system design discussion, so afterwards you can see whether you covered the pending state and reconciliation or only the happy path. Screenshot a coding or machine coding prompt and it reads it and can suggest an approach to check your own against. With your résumé and the PhonePe job post added (Pro or the free trial), its suggestions for the hiring manager round come from your real projects. Learn more about an AI interview assistant.
Questions people ask
What is the PhonePe SDE interview process?
Candidates commonly describe an online test or screen, one or two problem-solving rounds, a machine coding or low-level design round, system design for senior roles and a hiring manager round. It varies by team and level.
What system design questions does PhonePe ask?
Common themes are peer-to-peer UPI transfers, resolving pending transactions, transaction history at scale, merchant QR payments, festival offers and cashback, payment notifications and disaster recovery.
What machine coding questions come up at PhonePe?
App-shaped modules such as a wallet with refunds, a cashback engine with budgets, split-the-bill, bill reminders, scratch-card rewards or a simple fraud rule engine.
How do I prepare for a PhonePe software engineer interview?
Practice hashing, sliding window and graph problems, build a wallet and an offers engine with tests, learn the general UPI flow and pending states, and prepare incident and high-traffic stories.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
