A young NYPD officer has been arrested and charged with theft and fraud after authorities say he gave out a suspect’s card number to his friends. The scam was only foiled after his friends unsuccessfully tried to buy coffee at Starbucks.

NYPD rookie police officer ended up on the other side of the law after stealing an arrestee’s credit card information. (Getty Images/Tim Drivas Photography)

After a probe into the fraud, Officer Andy Urrutia, a one-year rookie cop, was charged with grand larceny, criminal possession of stolen property, petty larceny, official misconduct, attempted identity theft, and unlawful possession of personal identification. 

Prosecutors stated the card owner had been arrested and detained at the 52nd Precinct stationhouse for three days before Urrutia, 24, gained access to the card. During her stay, her belongings were secured in police custody, providing him the opportunity to use his cellphone to capture images of her card.

Police reports state that the officer sent photos of the credit card and shared them with a group of his friends on a text thread on March 23 that said, “Lunch on me guys!!!” later adding, “You are all welcome,” according to the New York Daily News.

The images clearly showed the woman’s credit card number, expiration date, and security code.

His friends responded.

One person named Lemon quipped, “Probably got overdraft fees cause they broke.”

The officer chimed in, “Try it,” before telling them to use a Bronx ZIP code.

“About to run it up at Starbucks,” another one replied.

When the friend attempted to make a purchase the card number was declined by a Starbucks barista, according to court records.

The young men were persistent and tried to use the card four additional times. Finally, they abandoned their attempt. The fraud attempts occurred within a 12-minute time frame.

The card owner, seated in the NYPD station house, realized that someone was using her card. It was at that moment she reported the fraud attempt, especially considering she had only entrusted her card with her belongings to the officers within the station.

The NYPD Internal Affairs Bureau was able to trace the crime to Urrutia. He was later apprehended early Tuesday, Jan. 2, around 11 a.m. Officers arrested him after he had completed a midnight shift.

“When he got off, they were waiting for him in the upper lot [of the 52nd Precinct stationhouse]. He was taking pictures of victims’ and perps’ IDs and credit cards and sending them to friends who made charges,” the New York Daily News reports an insider from the department said.

Atlanta Black Star was unable to verify whether it was a credit card or a debit card.

He pleaded not guilty during his arraignment in Bronx Criminal Court. Still, the rookie was suspended from the force without pay following his arrest.

A Bronx Criminal Court judge ordered the officer to be released on his own recognizance and scheduled his return to court on Feb. 6.