A little over four years ago, Nasser Saleh’s Amman-based startup MadfooatCom was struggling to survive. It built an online billing platform, but in a country where people pay their bills in person and in cash. As a result it found it nearly impossible to get local banks and billers to embrace MadfooatCom.

In neighboring Saudi Arabia, where the 45-year old Saleh had lived, making payments online was already commonplace. The government has its own payment system called Sadad. The Jordanian native reasoned his country could use a similar service, but he miscalculated.

On the verge of running out of money, he reached out to the Central Bank of Jordan in 2013. Saleh sent a fax to the governor of the Central Bank pitching his electronic billing platform, with the odds of getting a response close to zero. Much to his surprise, he got a phone call from Maha Bahou, an executive director at the bank who oversaw payments. The Central Bank, it turns out, was transitioning to e-payments, and she was interested to hear his proposal.

Bahou invited Saleh to bid on the government’s new bill payment platform. To increase his chances of winning the tender, Saleh sought a meeting with Paul Edwards, the chairman of Emerging Markets Payments [EMP], a Cairo-headquartered e-payments services firm that operates Jordan’s ATM switch. It took several weeks, but he got in touch with Edwards through EMP’s office in Amman and Saleh pitched the idea of a partnership. MadfootatCom would develop and maintain the software, and EMP would host the platform on its servers and provide security. They agreed to split revenues 50-50. “That was a justified sacrifice,” says Saleh.

In late 2013, they beat eight other bidders, including Fawry, an Egypt-based e-payments company. “Luckily, their technical offer was the best,” says Bahou.

MadfooatCom now operates the bank’s online bill payments service, known as eFawateercom. More than 100 billers, including utilities and telecoms, receive payments electronically from 23 out of Jordan’s 25 banks through eFawateercom. “This tender really opened the door for us,” says Saleh. “We gained the

Since launching in 2014, eFawateercom has processed more than 7 million bills, worth $5.8 billion. Last year, it handled an average of 18,000 bills per day. “It is leading the transformation from cash into electronic payments,” says Bahou.

For Saleh, getting the tender from the Central Bank was a coup, but as it stands his business is totally reliant on the contract. MadfooatCom gets every single one of its customers through the Central Bank owned eFawateercom. As operator of the platform, MadfooatCom’s revenues come from collecting fees from billers using eFawateercom.

The fees MadfooatCom charges are set by the Central Bank. The amounts vary depending on the type of biller—for example, it charges utilities a $0.30 flat rate fee for each transaction. In addition to sharing revenue with EMP, MadfooatCom also gives up a share to the National Payments Council, an association of all the banks in Jordan that’s managed by the Central Bank.

Saleh expects MadfooatCom to turn a profit in 2018.

The company offers a glimpse into how the relationship between governments and startups is changing the Middle East’s nascent fintech sector. MadfooatCom was a pioneer in Jordan in that respect, but Bahou also gets huge credit for opening the bidding process to a company with no track record.“The approach we used with Madfooatcom was very debatable and controversial at the beginning, given the mentality and the very traditional and conventional way central banks and regulators follow in dealing with entrepreneurs and startups,” says Bahou.“Honestly, he broke the taboo.”

In the second quarter of 2018 the Central Bank plans to launch what’s known as a regulatory sandbox, which is a framework set up by the regulator allowing firms to experiment with new products under its close supervision.

It’s part of a larger trend playing out in other Arab countries. The lack of regulations around fintech has been a major obstacle for startups, but policymakers are starting to take a more forward-looking approach, as fintech becomes hot worldwide. Since late 2016, regulators in Dubai, Abu Dhabi and Bahrainhave separately introduced frameworks allowing fintech companies to test their products in their jurisdictions. Saudi Arabia has declared fintech an integral part of its Vision 2030 plan.

Last year, the Dubai International Financial Centre launched an accelerator for fintech startups, called Fintech Hive. Also in 2017, Abu Dhabi’s financial center the Abu Dhabi Global Market formed a partnership with U.S.-based startup accelerator Plug and Play to form a program for fintech startups.

Globally, the fintech sector has attracted more than $50 billion in investment since 2010, but currently the Middle East and North Africa only attract around 1% of that investment, Accenture reported last year. And, fintech regulations are a work in progress.

Saleh got into e-payments at Al Rajhi Bank in Riyadh, a few years after graduating from the University of Jordan with a degree in electrical engineering in 1995. “Part of my job was moving people from paying cash to electronic payments,” says Saleh. He worked there until 2005.

After more than a decade abroad, in 2008 he moved back to Jordan to raise his children in Amman and to be closer to his aging mother.

When he went to pay his electricity bill at the utility company in Amman, he waited in a long queue, only to be told that he couldn’t use credit cards. Saleh had to go to an ATM, take out cash, and wait in line again. “It was a horrible experience,” he recalls.

Saleh always wanted to start his own company. In 2010, he heard about Oasis500, a new startup incubator in Amman. He pitched his idea for MadfooatCom and was accepted. He resigned from his job at a USAID funded project helping the government of Jordan strengthen its fiscal infrastructure. Oasis500 gave him a desk for seven months and $15,000 in funding for a 10% equity stake. His brother also chipped in some money. Saleh then hired a programmer who helped him develop a proof of concept to take to banks and billers. Banks wanted to know how many billers had signed up, and vice-versa. They told him to come back when he had customers. In two years, Saleh convinced just two banks to adopt his service. Only one biller agreed to sign-up—and it never signed the contract.

“I will never forget that day,” says Saleh, when he clinched the Central Bank deal. The Central Bank gave them nine months to launch the platform; they completed eFawateercom in six months. Following a pilot phase where they brought on two mobile operators and Jordan’s customs department, eFawateercom launched in May 2014.

Even with the Central Bank’s seal of approval, Saleh still found it difficult to get billers to adopt the service. Banks signed up readily, due to the Central Bank’s influence, but he still had to introduce billers to the concept. “We were going around the country, meeting with everybody,” says Saleh.

Although he declines to reveal the name, he says it took a year to convince one major electricity utility to signup, after which other utilities began to follow.

In 2015, he raised $5 million from Cairo Amman Bank, Bank al Etihad and the Capital Bank of Jordan, which he used to expand in Jordan, cover operations and help with marketing. That brought the total investment in the company to $5.8 million, with the rest coming from Oasis500 and angel investors.

Today, the company has about 100 employees. Roughly half of those are dedicated to MadfooatCom’s core operations: maintaining and developing its technology, or providing customer service and working on business development. The rest are working on spreading awareness on electronic billing—and many are spread out across its new subsidiaries in other countries.

Saleh’s been trying to launch an electronic billing service in Algeria forcnearly two years, but as with his early efforts in Jordan, it’s slow going. He’s exploring other markets too.

Last year, he set up a subsidiary in Oman. There he partnered with ONEIC, also known as Oman National Engineering & Investment Company, in a joint venture to introduce MadfooatCom’s service. ONEIC, he says, was looking to develop digital payments in Oman, and he was hunting for regional expansion opportunities, leading to the partnership.

He also expects to expand in Palestine this year. In January 2017, Saleh travelled to Albania at the invitation of its Central Bank, where he discussed another potential partnership.

“When I started I did not know the term fintech,” he says. “Now fintech is really booming.”