Subaan Rafiq, 21, from the Hodge Hill, Birmingham, was stopped by officers on Heath Street, Hednesford, in May 2021.
Officers found a wrap of heroin and crack cocaine, as well as two mobile phones which he had been using to sell drugs.
He was arrested at the scene and later admitted to the offences at an earlier court hearing.
Rafiq was sentenced to two years behind bars at Stafford Crown Court behind bars for offering to supply heroin and cocaine.
He was also ordered to pay a surcharge of £190 and to surrender £645 in cash which was found following a search of his address.
Detective Sergeant Jonathan Bradbury said: "These highly addictive and harmful substances have no place on our streets and I'm happy with the proactive action taken to remove them from circulation.
"Those responsible for drug distribution in Staffordshire will be targeted and dealt with as robustly as possible."
Staffordshire Police is working with West Midlands Police and the Regional Organised Crime Unit to disrupt drug-related activity and organised crime across Staffordshire.