IZMIR, Turkey — For months, Ahmed Abdul-Hamid, a Palestinian from the Syrian city of Aleppo, tried and failed to cross the sea to start a new life in Europe. The Turkish police detained him. Smugglers tricked him. Once, his boat stalled and he had to swim back to shore, leaving him stranded and broke.

But his fortunes changed this summer when a Turkish smuggler hired him to recruit passengers from among the refugees and migrants flooding into this port city. Soon, his phone was ringing nonstop with people trying to get to Europe, and the cash was pouring in for him — as much as $4,000 per day.

“Some weeks I get nothing,” Mr. Abdul-Hamid, 21, said. “Other times, I’m so busy I can’t keep up.”

Mr. Abdul-Hamid’s swift success is a small part of the multimillion-dollar shadow economy that has developed in Turkey to profit from the massive human tide rushing toward Europe. Much of this new economy is visible in the streets here, where smugglers solicit refugees, clothing stores display life vests and inner tubes, and tour buses and taxis shuttle passengers to remote launch sites along the coast.

Money is flowing through Izmir, the third largest city in Turkey, now a grim hub for migrants and a boom town for residents. Hidden from view is an extensive smuggling infrastructure, with makeshift “insurance offices” that hold migrants’ money, covert factories that churn out ineffective life vests and underground suppliers of cheap rubber rafts that sometimes pop or capsize during the voyage to Greece, stranding or drowning people at sea.