It’s the future of stick ups.

A pair of goons allegedly mugged a Manhattan teenager Sunday by snatching his cell phone and transferring $100 to their bank account through an app — only for the kid to turn the tables on them in an equally tech-savvy way.

The 21st-century street robbery happened just before 3 p.m. Sunday at the 4 train subway station at Union Square, when the 17-year-old said he was approached by a man peddling candy at the station.

“He gave me a story about how the candy was for his daughter’s graduation or something like that,” the teen, who gave his name as Zach, told The Post Monday. “I had a few dollars on me so I said, ‘Yeah, I’ll buy some candy.’”

He plunked down $2 for Airheads and Fruit Roll-Ups.

That’s when Zach said the guy and a buddy noticed he had a cash app open on his cell phone — as the teen was checking his Chase bank balance.

The two men then approached him and demanded he buy more candy.

“I started putting my phone in my pocket and he started laughing at me,” the teen said. “He called his friend over and his friend was like, ‘Hey, you helped him out, you gonna help me out now?’”

“He started getting mad. He was like, ‘Wow, that’s some b-tch sh-t,’” Zach recounted. “I should poke you.’ He reached into his pocket like he was going to take out a knife. He was pretty much like, ‘Don’t move or I’m going to stab you.’”

They demanded his iPhone 7S and the teen, intimidated, turned it over.

“He went on my cash app and typed in his information and sent himself $100 and then gave my phone back,” he said.

That’s when Zach realized that the bumbling thief “left all his cash app information on my phone.”

“So then after I found that out I went on my phone and started recording and started following them and accusing them of taking money out of my account,” he said.

“They were arguing, saying, ‘I didn’t do that, bro,’ but it was obvious he did because he left his information on my phone. And they were like, ‘That’s what you get for not giving us money.”

Zach then took all the information to the police, according to his father.

“It’s only a matter of time before the police find them,” said his dad.

Police are investigating whether the mugger can be identified through the app or the phone video.

Additional reporting by Tina Moore and Daniel Cassady