Residents of the Mathare slum area of Kenya's capital, Nairobi, are now able to access water through an ATM-style dispenser.
People living in slums traditionally rely on vendors, who are expensive, or polluted sources to get drinking water.
But the new system, where people use a smart card, is designed to provide cheaper and cleaner water.
The water company is opening four of these dispensers in Nairobi and there are hopes the scheme will be expanded.
A version of the scheme has been used in rural areas in Kenya, but it is thought this is the first time that it will be used in an urban area.
Residents swipe the smart cards, topped up at a kiosk or through a mobile phone, at the dispenser and water starts flowing from the tapThe Nairobi City Water and Sewerage company says it is charging half a Kenya shilling (half a US cent) for 20 litres of water.
This is much cheaper than the rates being charged by the water vendors, reports the BBC's Abdullahi Abdi in Nairobi.
The dispensers have been set up through a partnership between the local government and the Danish water engineering company Grundfos.
The company says that this public-private partnership model could be developed in other countries.
Meanwhile in another part of Nairobi residents are complaining about a water shortage
The BBC's Ahmed Adan in the suburb of Eastleigh says that vendors are selling water at 50 Kenya shillings for 20 litres - 100 times the price at the new water dispensing machines.
Having clean drinking water is one of the United Nations Millennium Development Goals and it is thought that worldwide more than 700 million people still do not have access to it.