Investigators said Jacob Connelly robbed a Sunoco and paid the clerk, Joshua Sims, $30 for helping him.
"The clerk, at the time, had conspired with Mr. Connelly to come in, stage a robbery, at which time the clerk would give all the money to the person who was pretending to rob him," said Trooper Stephen Limani.
Investigators said Connelly used a knife and pushed Sims around before taking money.
Police said Sims agreed to the theft and told Connelly to "beat him up a little" to make the robbery appear real.
Police said Connelly was charged after he was heard talking about the armed robbery.