Cracking the Razorpay Data Scientist Interview
Data Science is critical to Razorpay's core operations and its lending arm (Razorpay Capital). Detecting fraudulent transactions in real-time, assessing the creditworthiness of small businesses, and optimizing payment routing across different bank gateways all rely on complex Machine Learning models. The interview process tests your statistical foundation, your coding skills, and your ability to apply ML to high-stakes B2B financial problems.
Phase 1: Statistics and Coding Fundamentals
Before you build models, you must prove your mathematical and coding foundations.
- Probability & Statistics: Expect questions on probability distributions, A/B testing, p-values, and hypothesis testing. "Explain Bayes' Theorem and how it can be used in transaction fraud detection."
- Python/SQL Coding: You must be fluent in SQL and Python (Pandas/NumPy). You will be given a messy dataset and asked to write a script to clean it, handle missing values, and extract specific features.
Phase 2: Machine Learning Theory and Algorithms
This round evaluates your understanding of how models actually work under the hood.
- Model Selection: "When would you choose a Random Forest over a Support Vector Machine (SVM)?"
- Imbalanced Datasets: This is crucial for fintech (fraud detection). "Your dataset has 99.9% normal transactions and 0.1% fraudulent ones. How do you train and evaluate a model on this data?" You must discuss SMOTE, class weighting, Precision/Recall, and the F1-Score.
- Explainability (XAI): For lending (Razorpay Capital), you must explain why a merchant's loan was rejected. Expect questions on SHAP values or LIME.
Phase 3: Applied Data Science and System Design (The Decider)
This round tests how you translate a business problem into a scalable Machine Learning solution.
- The Scenario: "Design the ML architecture to dynamically route a payment to the bank gateway with the highest probability of success at this exact millisecond."
- The Breakdown: The interviewer expects you to discuss:
- Feature Engineering: What data will you use? (Historical bank gateway success rates, time of day, transaction amount, card network).
- Algorithm Choice: Multi-Armed Bandit approaches, Reinforcement Learning, or XGBoost.
- Production Deployment: How do you serve this model in under 10 milliseconds so the payment isn't delayed?
Top 3 Technical Questions to Prepare
- Explain how you would design a Credit Risk Model to determine if a new merchant qualifies for a ₹5 Lakh working capital loan based on their Razorpay transaction history.
- How do you handle highly imbalanced datasets when training a Machine Learning model for anomaly detection?
- Explain the concept of ROC-AUC. Draw an ROC curve and explain what the axes represent in the context of fraud detection.



