I've got a Pakistani passport & I'm going to travel from Pakistan to Iraq with a stay of 17 hours at a Turkish airport. Do I need a transit visa?
I think it might be a good time to contact the consulate to clarify.
You can go to the Consular Website of the Republic of Turkey put on the citizenship, passport, and visit purpose and it will tell whether you need a visa, which will tell you that you do.
From the Turkish Embassy in Islamabad
If the connecting flight to the third country does not require an overnight stay in Turkey, then no visa is necessary. In other words, Turkey does not issue Airport Transit Visa (ATV).
Even more so:
Note: Passengers who will have to wait at the Turkish International Airports for their next connecting flights are not required to have an “Airport Transit Visa (ATV)”. However, should those passengers wish to take a tour at the city or stay over, they have to either obtain their transit visas at the Turkish Embassies/Consulates in advance or they should ask for a “permission document” from the Turkish border security officials upon their arrival. Please be informed that the Turkish border security officials have the authority to grant or deny permission.
Safest course of action given the layover time I would get one.
You do not need a transit visa; more important there is no such thing as a transit visa for Turkey - there simply isn't one to give you.
If you don't want to spend time at the airport, you need to apply for a normal short stay tourist visa.
Do not rely on the permission document as a substitute for the visa. There is a high chance, given you hold a Pakistani passport, that you would be refused the permission document.
So, the bottom line is - if you plan on visiting Istanbul, get a visa in advance from the embassy.