In Copenhagen there’s been a “freebike” system going on for many years.
You put a coin into the slot (exactly like shopping trollies) and when (and where) you leave the bike, you get your coin back again. It is now ready for the next person to use it.