Luke McAllister of Buntingford was working on a separate site, on the A1198 in Cambridgeshire last November when he trespassed on to the plot, went into site hut and took a wallet containing a bank card.
The 35-year-old then walked over to a nearby petrol station and attempted to purchase a packet of cigarettes but the card was declined twice.
The victim received a notification on his mobile phone of the failed transactions and went to the garage to investigate.
He got a description of McAllister and spotted him working on the building site so called police for assistance.
McAllister ran away when police arrived, climbed a fence and then attempted to hide in some brambles where he was arrested.
At Cambridge Crown Court McAllister was sentenced to four months in prison after pleading guilty to burglary, fraud by false representation and obstructing a constable.
PC Ridgway said: “The victim did the right thing calling us and as a result, McAllister is now paying for his actions.”