The headquarters of Paytm , India’s largest mobile payment and commerce platform, is located in Noida, but the lifeblood of the company is far, far away. No, it’s not in China where internet giant Alibaba, Paytm’s single largest investor, is based. Alibaba has no doubt been the springboard to Paytm’s rapid growth — the number of users of its app has risen 5 times to 125 million in just 12 months — but the vital cog in Paytm’s operations is located in Toronto, Canada’s most populous city.It is a lab in Toronto that manages critical pieces of Paytm business such as fraud detection, app improvements, user interface and customised advertising. Inside the lab are a bunch of data scientists who ensure that the transactions of the company’s wide user base are free from fraud and errors.Toronto is known to be one of the most a scenic and liveable cities in the world. It is also a centre for music, media and cultural institutions. The city also has plenty of something that Paytm was eagerly looking for — data scientists.Even so, Toronto is not the first name that springs to mind when one is scouting for people who analyse millions of data streams to detect patterns from purchase habits of users to suspicious transactions. That would be Silicon Valley in the US or Hamburg in Germany. “Even Alibaba and Baidu built campuses in Silicon Valley to tap such talent.While Flipkart has tried to import such skills,” says Paytm founder Vijay Shekhar Sharma. But Sharma was indifferent to both places — Silicon Valley because there is a “constant war for talent and costs are too high” and Hamburg “due to language issues”.In stark contrast, Toronto not only offered plentiful access to data scientists, but they were cheaper too. Sharma set up Paytm’s lab a year ago in the year.The decision was also made easy because Harinder Takhar, a senior employee, was relocating to Toronto. Takhar took to hiring data scientists from internet companies, nuclear science establishments, the analytics sector and other ‘geeky’ places. He has hired 30 in all, a truly global pool of people hailing from Asia, the US and Europe.Takhar, a former Blackberry engineer, heads the labs. In Takhar’s own words, his team on one hand looks at transactions that are not legitimate and on the other, looks for new revenue opportunities.Paytm has a team for the first job — fraud detection — and two others for the second — advertising and merchant analytics. Each job is critical. Given the huge number of transactions that happen on the platform, fraud can be damaging. “You can’t become a playground for fraudsters,” says Sharma.But the problem is there is no end to tricksters at work. Online platforms are rife with people who misuse credit and debit cards; who create multiple accounts to benefit from special schemes —like additional 20% off for first-time users — or for that matter, merchants who buy goods in bulk at a discount only to sell from their brick and mortar outlets at a markup or even cab drivers booking rides on their own cars to claim incentives.According to retai l consultancy Technopak, e-commerce in India is expected to be worth Rs 65,000 crore for the financial year ending March 2016. Payment gateway PayU India estimates about 5% of all e-commerce transactions are fraudulent. That is a whopping Rs 3,250 crore worth of shady e-commerce transactions, or three times larger than what the industry spent on shipping products in 2015.Fraudulent transactions are now about 0.5% of the total transactions on Paytm. The goal is to get this to less than 0.1%, or five times less fraud than the present level. Sharma says fraud can’t be completely eliminated. “But when you are working on low margins, like we have at 2.5%, we have to constantly check and control fraud.” Alibaba benchmarks fraud rate at 0.03% or below and works on a 0.4% margin.That’s what Adam Muise, the chief technology officer, aims to achieve. Muise had stints at IBM and HP before joining Paytm. He was part of the Toronto Hadoop Group — a club of data engineers familiar with Hadoop, an open source software that helps in processing large data sets. “There are more than a million transactions happening every day on Paytm, generating multiples of 100s of terrabytes of data. Our challenge is to detect frauds and keep ahead of the fraudsters,” says Muise.For that, Paytm needs deep computing skills. Armando Benitez , data scientist, Paytm Labs, says fraud is like the search for the unknown and he and his colleagues search for it in the one peta byte of data that Paytm users generate every day. “And it’s a dynamic problem — fraud today is totally different from fraud tomorrow.”Armando is a nuclear scientist who worked at CERN, the Geneva headquartered European organisation for nuclear research, where he focused on studying exotic particles. He is also an active member of the machine learning community at Toronto.“My focus at Paytm is fraud detection and risk mitigation. For instance, fraud, points out Armando need not always be misusing a credit card, but misusing an offer.”Say, Paytm offers 20% discount to first time users. The scientists ensure that a single user is not compromising the system to avail of the discount for himself multiple number of times. Also, the team detects and alerts that individual buyers are shopping and not shopkeepers taking advantage of discounts to re-sell products from their stores. “The fraudster comes with an intention to compromise the system,” says Armando.If Armando is searching for the next spotty transaction, his colleague Honsa Kozel, data engineer is busy improving target of ads on the app. Kozel came to Canada as a political refugee from the Czech Republic. A masters in geophysics, Kozel has studied deep portions of the Earth’s crust and has also explored for minerals. Just before joining Paytm, he worked at Personagraph, a Silicon Valley-based startup that creates mobile user profiles to improve revenue for its customers.At Paytm, Kozel’s goal is to target ads. So, if you are buying a laptop, ads related to the gadget will be shown and not that of shirts or binoculars. Also, he ensures ads of laptop cases and laptop travel bags are pushed to buyers. “We analyse signals — if people are looking for sports goods, we increase supply of such products on the app,” says Kozel.The beauty of digital transactions is that there is a trail that users — genuine or fraud — leave. Sharma believes he has the right team to study those trails in Toronto and it will be 200 people large in the next one years. He says the year 2016 will witness the coming of age of mobile commerce. “Mobile will be the primary way of shopping, we can’t afford fraudsters to spoil the party.”