If you are visiting Beijing and want to rent a bike, I suggest using either Mobike or Ofo. If you haven't heard of them, they are basically GPS-enabled bikes that you can book from your phone. They are very convenient because they are all over the city, and you don't have to return them, just leave them wherever you are done with them. They are also very cheap ($4USD per hour for both Mobike and Ofo)
To use Mobike (the app I use because I find both their app and their bikes to be better than Ofo):
Download their app on your phone. Do this before you come to China because they send a SMS confirmation text to your phone number with an activation code
Link your credit card in the app. I know they accept Visa and MasterCard; I'm not certain about American Express, JCB, and other credit cards. Once you link up the credit card, add some value to it. I recommend adding ¥100 ($16 USD) to start
Get a SIM card in Beijing so you have mobile data. For these apps to work, your phone needs to be connected to the internet.
When you need a bike, just open the app. The app will show you where the closest bike to you is on a map. Follow the GPS to get to your bike. When you are there, use the app to scan the QR code printed on the bike. The bike will unlock automatically. Now you can ride it for as long as you want
When you are done with the bike, you don't need to look for a place to return it. Just leave it where you are (on a sidewalk, just make sure it's not blocking pedestrians), lock it up. That's it. The app automatically knows you've returned it and will charge your account based on the time you've used it.
Instead of using the GPS to find the closest bike, you can just walk around your area and you will likely see their bikes everywhere. Mobike bikes are orange, and Ofo bikes are yellow. Here's what Mobike looks like: