# How Razorpay Built a Customer Data Platform for Queryable Segments at Scale

DevFeed: [How Razorpay Built a Customer Data Platform for Queryable Segments at Scale](<https://devfeed.tech/articles/turning-scattered-data-into-queryable-segments-at-scale-how-razorpay-built-its-customer-data-24045.md>)

Original publisher: [Read original article](<https://engineering.razorpay.com/turning-scattered-data-into-queryable-segments-at-scale-how-razorpay-built-its-customer-data-3937c4b012de?source=rss----6407ad2e59af---4>)

Author: Varun Meka

Published: 2026-06-26T08:06:33Z

Content type: article

Language: en

Sources: [Razorpay Engineering - Medium](<https://devfeed.tech/sources/razorpay-engineering-medium.md>)

Topics: [data](<https://devfeed.tech/topics/data.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [App](<https://devfeed.tech/topics/app.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Apache Spark](<https://devfeed.tech/topics/spark.md>)

Tags: [app](<https://devfeed.tech/tags/app.md>), [banking](<https://devfeed.tech/tags/banking.md>), [card](<https://devfeed.tech/tags/card.md>), [customer](<https://devfeed.tech/tags/customer.md>), [data](<https://devfeed.tech/tags/data.md>), [devices](<https://devfeed.tech/tags/devices.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [payments](<https://devfeed.tech/tags/payments.md>), [platform](<https://devfeed.tech/tags/platform.md>), [razorpay](<https://devfeed.tech/tags/razorpay.md>), [saas](<https://devfeed.tech/tags/saas.md>), [scale](<https://devfeed.tech/tags/scale.md>), [shopping](<https://devfeed.tech/tags/shopping.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

## AI overview

Razorpay describes building an in-house Customer Data Platform to unify fragmented customer and transaction data into queryable audience segments. The supplied excerpt says the platform serves segments across more than 500 million user profiles in under 30 milliseconds while keeping personally identifiable information isolated in source systems.

## Source excerpt

Turning Scattered Data Into Queryable Segments at Scale: How Razorpay Built Its Customer Data Platform A consent-native CDP that serves audience segments across 500M+ user profiles in under 30ms, with PII isolated to the source systems. The Problem We Were Solving A customer opens her favourite online shopping app, adds a few items to her cart, and pays INR 1,200 via UPI, powered invisibly by Razorpay. A week later she returns and pays using a saved Visa card from her laptop. Later that month, she places a larger INR 8,500 order through net banking from work. Three transactions. Three different payment instruments. Three different devices. To the merchant's engineering team, and to Razorpay's data systems, these could look like three completely different people, unless you've done the hard work of figuring out they're all the same customer. Now suppose this is a D2C fashion brand approaching their Diwali sale. The merchant's growth team has a clear plan: "Identify customers who have transacted at least once in the last 30 days, have spent more than INR 5,000 cumulatively this quarter, and haven't enrolled in our loyalty programme. Send them an early-access nudge with a personalized discount 48 hours before the public sale opens." A year ago, answering that question at Razorpay meant filing a cross-team data request, waiting for an analyst to write a custom Spark job, and getting an answer in 2-3 days. By the time the merchant had the segment, the Diwali sale was already live. The early-access window had closed. The campaign got sent to a broader, less-targeted audience, wasting spend on customers who would have bought anyway and leaving cold customers untouched. Now multiply that pain by millions of merchants. Razorpay powers payments and growth for over 12 million merchants. From D2C fashion brands and SaaS startups to subscription platforms, ed-tech companies, and the 2 million+ local merchants accepting QR payments every day. Together, they process billions of transaction