Startup · Bengaluru
Juspay interviews are unique — strong Haskell/Purescript culture, payments domain expertise, and functional programming proficiency expected.
Process: Functional Programming Test → Technical × 3 → HR
What does Juspay build and what makes their engineering culture unique in India?
Tip: Juspay: payment orchestration platform (powers checkout for Amazon India, Swiggy, Ola). Unique culture: one of the few Indian companies using Haskell and PureScript in production. They deeply value functional programming — if you apply, at least understand FP basics (pure functions, higher-order functions, algebraic data types).
What is functional programming? Explain higher-order functions and immutability.
Tip: Higher-order function: takes functions as arguments or returns a function (map, filter, reduce). Immutability: once created, data cannot be changed — new values are returned instead. Why FP at Juspay: payments require correctness guarantees. Side-effect-free functions are easier to test, reason about, and run in parallel.
Design Juspay's payment router that selects the optimal payment gateway for each transaction.
Tip: Inputs: amount, payment method, merchant, user bank, time of day. Routing logic: success rate × latency score per gateway per bank+method. Fallback: if primary gateway returns error code X → retry on secondary. A/B routing: 5% traffic to new gateway to build success rate data. Config-driven: routing rules stored in DB, hot-reloadable.
What is a monad in functional programming and how does Haskell use it for error handling?
Tip: Monad: a design pattern for chaining operations that handle a computational context (error, async, state). Maybe monad: wraps a value that might be absent (like Optional in Java) — chains operations that might fail without explicit null checks. Either monad: Left (error) | Right (success) — used extensively at Juspay for payment error propagation.
How would you implement a payment retry mechanism with exponential backoff?
Tip: On transient failure (timeout, 503): retry with delay = initial_delay × 2^attempt (+ jitter). Max attempts: 3. Only retry idempotent operations (GET, PUT with idempotency key) — never blindly retry POSTs. Store retry state: attempt count + timestamp in Redis. Dead letter queue after exhaustion for human review.
Explain the concept of referential transparency and why it matters for payment processing.
Tip: Referential transparency: a function always returns the same output for the same input, with no side effects. A pure payment validation function: given the same transaction data, always returns the same validation result. This makes it trivially testable and safe to run in parallel. Juspay uses this principle to build highly reliable payment validators.
Tell me about your experience with functional programming or your plan to learn it.
Tip: Be honest about your FP experience. Even basic knowledge counts: have you used Python's map/filter/reduce? Scala or Clojure? Haskell courses? Juspay doesn't expect fluency from non-FP backgrounds, but genuine curiosity is non-negotiable. Mention specific steps you've taken (Haskell Book, Learn You a Haskell, etc.).
What is type safety and how does Haskell's type system prevent payment bugs?
Tip: Haskell has a strong, static type system with type inference. Newtype pattern: `newtype Amount = Amount Int` prevents accidentally adding a Rupee amount to a Dollar amount. ADTs (Algebraic Data Types): `data PaymentStatus = Pending | Success | Failed String` — exhaustive pattern matching at compile time prevents unhandled states.
How would you debug a production issue in a Haskell service where a payment is stuck in pending?
Tip: Step 1: Check structured logs for the payment_id (Juspay logs every state transition). Step 2: Check the callback received from the gateway — did the bank respond? Step 3: Check for deadlocked database transaction (STM in Haskell). Step 4: If gateway silent, trigger a status enquiry API call. Always: handle and log every IO exception.
Write a function in any language to flatten a nested list of arbitrary depth.
Tip: Recursive: if element is a list, recurse; else append to result. In Python: `[item for sublist in l for item in (flatten(sublist) if isinstance(sublist, list) else [sublist])]`. Iterative: use a stack. Haskell: `concatMap` on the recursive call. Juspay tests functional thinking — the Haskell-idiomatic solution is a bonus.
Juspay Technologies interviews follow a 4-round process. Here is what to expect and how to prepare for each stage.
Upload your resume and get questions scored across technical depth, communication, structure, confidence, and relevance — the same criteria Juspay panels use.