Image copyright Fernando Perecin Image caption Henrique Dubrugras (right) and Pedro Franceschi say they are just like normal teenagers and still enjoy playing videogames and hanging out with friends

Many parents look at their teenage boys glued to their games consoles and computer screens and worry about their future.

The mothers of Henrique Dubrugras and Pedro Franceschi aren't worrying any more.

The two Brazilian teenagers used to spend about a third of their day on screens, but for them it has more than paid off. And while there are plenty of internet entrepreneurs that start young, their story stands out.

Now aged 19, they already have a successful start-up, Pagar.me, that employs 30 people and has a multimillion-dollar annual turnover, with scholarships to Stanford University to boot.

When Henrique was 12, he was a big fan of the Korean multi-player online game Ragnarok. As his parents did not want to pay for its premium features, he started programming them himself: "I used to make my own servers so I did not have to pay for the original version."

He subsequently worked out how to make real money on the game through the extra skills he had. At first his parents were a bit shocked, concerned he might be gambling online.

Co-founder Pedro Franceschi started even younger, tinkering with software from the age of nine.

Image copyright Fernando Perecin Image caption The two teenagers used to spend almost a third of their time online

"We both started programming computers as a way to achieve things we wanted," he says.

Pedro wanted to use Apple's new personal assistant, Siri, but she only spoke English. By the age of 15, he had managed to make Siri speak Portuguese.

Eventually, aged 16 and 17, the two teenagers met on Twitter. In contrast to a typical teenage chat about music or football, their first encounter was a debate over the relative merits of different text editing software for programming. But they soon realised their ambitions and dreams made them more alike than different.

"That was when our friendship began. Pedro also started to use my text editor. I won the argument and gained a partner," Henrqiue says.

While he lived in Sao Paulo, Pedro was more than 400km away in Rio de Janeiro, so initially the partnership developed online.

In the meantime they were also dealing with the same kind of problems that have beset teenage boys for generations. "What if I ask a girl from my class out and she says no? It will be awkward still to see her every day after that," says Henrqiue, explaining the age-old dilemma.

He attended a hackathon and his team came up with a Facebook-based app: AskMeOut. Like Tinder, the platform gave young romantics the opportunity to signal an interest in each other and see whether it was reciprocated without risking face-to-face rejection. Henrique's team won first prize and 50,000 reais (£8,500).

But Henrique realised that men and women (or was it boys and girls?) were using the app in different ways: while women were more choosy, men used to click on most of their female contact list. His solution was to only charge male users: since each "like" was paid for, they became more selective.

AskMeOut was a success, but Henrique wanted a better payment system to go with it.

Image copyright Fernando Perecin Image caption Pagar.me's staff range in age from 16 to 45, but the 19-year-old co-founders say their youth hasn't affected their relationship with employees

Image copyright Fernando Perecin Image caption Pagar.me is expect to handle 500m reais (£83m) this year

Luckily this was the point at which he met Pedro. The friends brainstormed a solution, at which point Pagar.me started to evolve.

Today Pagar.me handles payments worth millions of reais a year, has won a series of awards and attracted 1m reais in outside investment.

In short, the platform provides a cheap and simple way for customers to pay for goods online, combining the low cost of a third-party service such as Paypal with the simplicity of paying directly on the vendor's site without having to log in to another system.

Pagar.me takes a 1.5% charge from each purchase plus tax of a half a real (8p). Clients also pay a commission that varies between 3% and 5% to Pagar.me partners.

"People did not believe we could create such an innovative product," says Henrique.

He admits it would not have been possible without attracting the right staff, as well as the support of mentors and their families.

Image copyright Fernando Perecin Image caption Henrique Dubrugras (right) and Pedro Franceschi plan to run Pagar.me from the US while they study at Stanford University in California

Pagar.me's team of 30 are aged between 16 and 45. Yet according to the two co-founders, their relative youth has not affected their relationship with staff.

"We believe that good leaders are those who achieve their targets together with their team. It's not a question of your gender, qualifications or age", Henrique says. "Leading a business is a bumpy road, but we were always lucky to be guided by people we admired at tough moments - something that saved us a lot of times during the company's evolution", he adds.

Despite the scale of their success, Henrique doesn't think they are that different from others their age.

"Actually, we are still teenagers. We like playing videogames and hanging out with friends. I think it's getting more and more common for people to pursue their ambitions at an early age. We are just two regular people running our business."

What next for Henrique and Pedro?