Just FYI, to ride the tram/metro and use some public toilets you need an Istanbulkart, easily purchasible and cheap at machines at metro and tram stops. You then add money to it and can ride the metro and trams just by scanning the card when you enter a station or stop.
Be vigilant when purchasing! I got scammed yesterday when, after finishing my metro card purchase and awaiting the card to dispense, a friendly "local" came to help "validate" the card. He literally grabbed the card, my credit card, and punched a few buttons and walked off. It happened in mere seconds, before I could even say "no!"
Within maybe a minute of this happening i got a bad feeling when i saw another guy helping other tourists at the machines. I then got a text notification from my credit card of an unauthorized charge, about 16 bucks, which is much more than the metro card i bought and what I loaded on it. I think the guy did a slight of hand and perhaps topped up another card when he grabbed my CC and started pushing buttons, or maybe he skimmed the card? I won't know for sure but the CC company caught it and froze the card so no harm other than the embarrassment of getting scammed.
Isstanbul is incredible, IMO, but requires hyper-vigilance for scams and pickpockets. Stay sharp. I thought no one would ever get me until they did. This happened at the Sultahnamet tram stop, tourist central.