Razorpay software engineer interview questions and process

Razorpay software engineer interviews typically mix data structures and algorithms, a machine coding or low-level design round, and system design shaped by merchant payments: accepting money through a gateway, notifying merchants by webhook, settling funds and reconciling every rupee. Candidates also report a hiring manager round on ownership, and payments knowledge such as idempotency and failure handling helps in nearly every round.

By Published 6 min read

How the Razorpay interview usually runs

Razorpay is a Bengaluru-based payments company that serves businesses: online payment acceptance, payment links and pages, subscriptions, and through RazorpayX, business banking and payouts. Its engineering work is mostly backend and platform heavy, with SDKs and dashboards on top. The process is not published; the steps below are the most common pattern in candidate accounts, and individual teams add or merge rounds.

  1. Screen. An online coding test or a technical phone screen, depending on level and source.
  2. Problem solving. Live data structures and algorithms, with code that has to compile or run.
  3. Machine coding or low-level design. A small but complete module built or designed with good structure and tests.
  4. System design. For experienced engineers, a payments-flavored distributed system.
  5. Hiring manager round. Past systems, ownership, incidents and how you collaborate.

What Razorpay looks for

A merchant's business stops when payments stop. Engineers here need to think about failure first: the bank times out, the customer's UPI app closes, a webhook is delivered twice or not at all. Interviewers look for people who design for retries without duplicates, keep an auditable record of every state change, and write APIs that a developer at a small business can integrate in an afternoon. Security and compliance awareness, such as not storing raw card data, is a plus even when it is not the topic.

Data structures and algorithms questions

Coding questions with a payments flavor
QuestionWhat it testsWhat a strong answer shows
Given a list of transactions between people, minimize the number of transfers to settle all debts.Greedy and backtracking.Net balances first, then matching largest creditor with largest debtor, and the note that the optimal answer is harder in general.
Detect duplicate payment requests within a time window.Hashing with expiry.A map from request key to timestamp and cleanup of old keys.
Merge two sorted transaction logs and flag entries present in only one.Two pointers for reconciliation.A linear merge on transaction ID and a clear report of mismatches.
Implement a rate limiter that allows n requests per merchant per minute.Sliding window or token bucket.Per-key state, the edge case at window boundaries, and memory cost per merchant.
Find the maximum sum subarray of daily net settlements.Kadane's algorithm.Linear time and handling an all-negative array.
Validate a card number with the Luhn check.Digit manipulation.Doubling every second digit from the right and subtracting 9 when over 9.
Schedule retries for failed webhooks with exponential backoff and a cap.Heaps by next-attempt time.A min-heap keyed by time and a maximum attempt count.
Split an amount among n parties by percentages so the parts add up exactly to the total.Rounding with integers.Floor every share, then hand the leftover paise to the largest remainders in a stated order.
Find the first transaction that pushed an account below zero.Prefix sums.A single pass with a running balance.
Given currency conversion rates, convert between two currencies with the best rate.Graphs.Edges as rates, a search for the best product, and a cycle check for arbitrage.
Coding questions with a payments flavor. Scroll sideways on a small screen.

Machine coding and low-level design questions

These rounds reward small classes, clear interfaces and handling of the unhappy path. Keep money in the smallest unit as integers, make operations idempotent and write a few tests that prove it.

  • Build a double-entry ledger where every transfer debits one account and credits another. Balanced entries, no negative balances unless allowed, and an append-only history.
  • Build a webhook dispatcher that retries failed deliveries with backoff. A delivery attempt record, a retry policy interface and a dead-letter list after the last attempt.
  • Design a payment state machine: created, authorized, captured, refunded, failed. A transition table and rejection of illegal transitions such as refunding a failed payment.
  • Build split settlement for a marketplace order paid once and shared among sellers. Splits that sum exactly to the total, with a rule for leftover paise.
  • Design a subscription billing module with plans, trials and retries on failed charges. Billing cycles, proration rules stated as assumptions and dunning states.
  • Build a payment links service: create, expire and mark as paid. Unique short IDs, expiry checks and idempotent payment marking.
  • Design an API client SDK with retries and timeouts. Safe retries only for idempotent calls, and an idempotency key header for others.
const crypto = require("node:crypto");

function verifyWebhook(rawBody, signatureHex, secret) {
  const expected = crypto.createHmac("sha256", secret).update(rawBody).digest();
  const given = Buffer.from(signatureHex, "hex");
  return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}

const body = '{"event":"payment.captured","id":"evt_1"}';
const sig = crypto.createHmac("sha256", "s3cret").update(body).digest("hex");
console.log(verifyWebhook(body, sig, "s3cret"));       // true
console.log(verifyWebhook(body + " ", sig, "s3cret")); // false
Verifying an HMAC signature on an incoming webhook (Node.js)

Interviewers like to ask why the check uses the raw body rather than parsed JSON (re-serializing can change bytes) and why a constant-time comparison matters (it avoids leaking how many bytes matched).

System design questions

Start every payments design with the states a payment can be in and the external parties that can fail. The payment system walk-through covers the core, and notification system design helps with webhooks.

Design prompts for a Razorpay loop
PromptWhat it testsWhat a strong answer shows
Design a payment gateway that accepts cards, UPI and netbanking for merchants.Orchestration across providers.A payments service with a state machine, connectors per method and bank, routing, and idempotency on create and capture.
Design webhook delivery to merchants at high volume.Reliable delivery.An outbox or event log, per-merchant queues, signed payloads, retries with backoff and a replay tool.
Design daily settlement to merchant bank accounts.Batch correctness.Settlement windows, fee and tax deductions, holds, and payout files or APIs with reconciliation.
Design reconciliation between internal records and bank reports.Matching at scale.Keys to match on, tolerance rules, exception queues and who resolves them.
Design a payouts API for businesses paying vendors.Money out, safely.Balance checks, approvals, idempotency keys and status callbacks from the bank.
Design a fraud check step that runs before a payment is authorized.Low-latency risk scoring.Rules plus a model, a strict time budget and a fail-open or fail-closed choice per risk level.
Design storing saved cards safely.Security and compliance.Never storing raw card numbers, using network tokens or a vault, and keeping the sensitive scope as small as possible.
Design prompts for a Razorpay loop. Scroll sideways on a small screen.

Hiring manager and behavioral questions

  • Tell me about a bug that cost money or trust and how you handled it. Fast containment, honest communication and the fix that prevented a repeat.
  • Describe a time you designed for failure before it happened. The failure you predicted and the safeguard you built.
  • How do you decide between building a feature and fixing reliability? A framework using impact and risk, with an example.
  • Tell me about an API you designed. What would you change now? Naming, versioning, errors and idempotency.
  • Describe working with a team that owned a dependency you needed. How you got what you needed without escalating first.
  • Why Razorpay? Something specific about payments infrastructure for businesses that interests you.

Fictional example

Answering the double-charge question
Interviewer
A merchant's server times out and calls create payment again. How do you stop a double charge?
Candidate
The merchant sends an idempotency key with the request. We store the key with the request hash and the response in a table with a unique constraint. If the same key comes again with the same body, we return the stored response without touching the bank.
Interviewer
And if the first request is still in progress?
Candidate
The key row is written first with an in-progress status, so the second call sees it and returns a conflict or waits briefly. If the same key comes with a different body, we reject it, because that is almost always a client bug.

Four-week preparation plan

  1. Week 1: algorithmsHashing, two pointers, heaps, prefix sums and graphs. Two timed problems a day.
  2. Week 2: payments fundamentalsPayment states, idempotency keys, webhooks, settlement and reconciliation. Read the public developer documentation of any payment gateway to see real API shapes.
  3. Week 3: machine codingBuild the ledger and the webhook dispatcher end to end, with tests for duplicates and failures.
  4. Week 4: design and storiesPractice gateway and settlement designs, prepare incident and API stories, then run two mock loops.

For the consumer UPI side of payments, read the PhonePe software engineer guide. The Stripe software engineer guide is a useful global comparison, and the Zomato guide shows how payouts appear in a marketplace.

Natively can help you rehearse the payments thinking these rounds expect. During a mock design round it transcribes what you say, so you can check afterwards whether you covered retries, duplicates and reconciliation. Screenshot a machine coding prompt and it reads the requirements and can suggest a class structure to compare with yours. Load your résumé and the Razorpay job description (Pro or the free trial) and its suggestions for the hiring manager round draw on systems you have actually built. See the AI interview assistant.

Questions people ask

What is the Razorpay SDE interview process?

Candidates commonly report a coding screen, a problem-solving round, a machine coding or low-level design round, system design for experienced roles and a hiring manager round. Teams vary the order and count.

What machine coding questions does Razorpay ask?

Payment-shaped modules are common themes: a double-entry ledger, a webhook dispatcher with retries, a payment state machine, split settlements or a payment links service, built with clean classes and tests.

Do I need payments knowledge for a Razorpay interview?

It is not usually required, but it helps a lot. Knowing idempotency, payment states, webhooks, settlement and reconciliation lets you design for failures interviewers will ask about.

How should I prepare for a Razorpay software engineer interview?

Practice hashing, heap and graph problems, build a ledger and webhook dispatcher end to end, rehearse gateway and settlement designs, and prepare stories about incidents and APIs you designed.

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.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP