Autocoder

Razorpay Interview Questions and Answers

Last updated 2026-11-19

Razorpay is a payment gateway and banking platform, so interviews for engineers tend to explore how a payment actually travels from a checkout button to a settlement: authorisation, capture, webhooks, retries, refunds and reconciliation. This page offers practice questions with worked answers on those topics and the behavioural round.

They are practice questions on topics the rounds are commonly reported to cover, not a record of real interviews. For code problems see Razorpay coding round questions. The process is described in how to crack the Razorpay interview.

Typical roundsOnline DSA screen, low-level design, DSA plus managerial (commonly reported)
RolesSDE-1

Rounds as commonly reported

A recent SDE-1 account describes three rounds beginning with low-level design, for example a 90-minute task such as designing a photo-sharing app. Guides add an online DSA screen of two or three medium or hard problems for campus candidates, after CV shortlisting. A later round combines hard DSA with a project and managerial discussion.

These are candidate-reported and not published by Razorpay.

Hiring status

We have no sourced hiring statements for Razorpay to quote, and this site has no Razorpay page under /hiring. Check the company's own careers page at razorpay.com/jobs for current roles and any campus notice.

Concepts to revise

Authorisation versus capture, idempotency keys, webhook signatures, refunds and chargebacks, settlement cycles and reconciliation. If you have used the Razorpay checkout in a project, be ready to describe the request flow you saw.

Razorpay Interview Questions and Answers: questions with worked answers

  1. 1

    What is the difference between authorisation and capture?

    easy

    Authorisation checks that the customer can pay and places a hold on the funds; capture actually claims the money so it moves to settlement. Splitting them lets a merchant authorise at order time and capture after shipping. An authorisation that is never captured expires and the hold is released. Mention that many gateways support auto-capture for simple flows.

  2. 2

    How do you design webhooks so a merchant never misses or double-processes an event?

    hard

    Deliver at least once: persist the event, send it from a queue and retry with exponential backoff until the merchant returns a 2xx. Sign each payload with an HMAC so the merchant can verify it, and include an event id. Merchants must de-duplicate by event id and treat webhooks as hints, confirming state with a fetch API when it matters. Provide a dashboard and replay for missed events.

  3. 3

    Explain idempotency keys and how you would implement them.

    medium

    The client sends a unique key with a create-payment request. The server stores the key with a hash of the request and the response, under a unique constraint. A repeat with the same key and body returns the stored response; the same key with a different body is rejected as misuse. Expire keys after a day or more, and make the insert and the business action part of one transaction or use a recovery step for crashes between them.

  4. 4

    Design a photo-sharing app at the class level.

    medium

    Entities: User, Photo, Album, Comment, Like, with a Feed service. Photo has an owner, metadata and visibility. Use interfaces for storage and for feed ranking so each can change. Feed generation is the interesting part: fan-out on write for users with few followers and on read for very popular accounts. Put validation, permissions and error handling in their own methods, and finish with a small driver that exercises upload, like, comment and feed.

  5. 5

    How would you reconcile your records with a bank settlement file?

    hard

    Load the bank file and your ledger for the same window, match by a shared reference such as the bank reference number and amount, and classify outcomes: matched, missing in ours, missing in theirs, amount mismatch. Auto-resolve known patterns, queue the rest for review, and record every action. Run it daily and alert on the unmatched count crossing a threshold.

  6. 6

    What are the main causes of payment failures and how do you reduce them?

    medium

    Issuer declines, bank or network timeouts, wrong OTP or expired session, and gateway errors. You reduce them by retrying through a different route or provider where allowed, using smart routing based on recent success rates, giving clear error messages and allowing a quick retry with another method, and monitoring success rate by bank and method in real time.

  7. 7

    Design a system that shows a merchant live payment success rate.

    hard

    Stream payment events through a queue to a stream processor that aggregates counts per merchant and method over a sliding window, and write results to a time-series or key-value store read by the dashboard. Use approximate windows to keep memory bounded, and handle late events with a small allowed lateness. Alert when the rate falls below a threshold.

  8. 8

    Explain database sharding and the downsides.

    medium

    Sharding splits data across databases by a key, such as merchant id, so each handles part of the load. The costs are cross-shard queries and transactions, rebalancing when shards grow unevenly, and hot keys when one merchant is huge. Choose a key matching your access pattern and use consistent hashing or a lookup service to ease resharding.

  9. 9

    What is the CAP theorem, and how does it apply to a payment system?

    easy

    Under a network partition you choose consistency or availability. For the ledger you choose consistency: it is better to reject a payment than to risk double-spending. For read-only dashboards you can choose availability. State that partitions are rare but the choice must be designed in.

  10. 10

    How do you secure card data and API keys?

    medium

    Never store raw card numbers or CVV unless you are PCI DSS compliant, and prefer tokenisation so only a token travels through your systems. Encrypt in transit with TLS and at rest, keep secrets in a vault rather than in code or logs, rotate keys, and give API keys the least privilege they need. Mask sensitive fields in logs.

  11. 11

    Tell me about a time you found and fixed a bug in production.

    easy

    Use STAR. Explain how you noticed it (alert, user report), how you contained the impact first, how you found the root cause using logs or a reproduction, the fix, and the test and monitoring you added. Show calm, ownership and learning.

  12. 12

    Why Razorpay and why backend work?

    easy

    Link your answer to a real interest in payments infrastructure and its reliability demands, mention a project where correctness mattered, and say what you want to learn. Keep it specific rather than quoting the mission statement.

Frequently asked questions

Does Razorpay start with a low-level design round?

A recent candidate account describes low-level design first, but Razorpay does not publish its process and it varies.

How hard are Razorpay DSA problems?

Reports mention medium and hard problems. Practise graphs, heaps, DP and sliding window.

Do I need prior payments knowledge?

Not required, but understanding authorisation, capture, idempotency and webhooks helps in design discussions.

Where do I find Razorpay roles?

On the company's own careers page. This site has no sourced hiring statements for Razorpay.

Sources

Related guides

More in Company Interview Questions

See all in this section