A yellow taxi was the getaway car of choice after a Manhattan bank heist Wednesday morning, but the crook wasn’t aware the teller had put a tracking device in the cash, police said.

The robber hailed the cab after getting away with a bag of money from the TD Bank at 314 Grand St. on the Lower East Side around 10:30 a.m., officials said.

“He passed a note to the teller,” a police spokesman said. “The bank teller handed him a bag with $600 and a GPS tracking inside.”

Cops stopped the taxi around 11:04 a.m. about 10 miles away at Second Avenue and 39th Street in Sunset Park, Brooklyn.

The robber, identified by police as Jose Rivera, was taken into custody. Rivera, who is homeless, was charged with robbery, cops said.