Mark Dornan, 22, was arrested after officers from the UK Border Force intercepted a parcel sent from Belgium.
The parcel was opened at a Royal Mail depot in Coventry and found to contain over half a kilo of the Class B drug.
Police obtained a search warrant and raided Dornan's home in Raploch, Stirling on 8 April.
Stirling Sheriff Court was told officers found a shoebox in his bedroom containing digital scales, almost Â£570 in cash, and a card containing notations.
They also found a message on a phone about an agreement to supply someone with a half-ounce of the drug for Â£125.
Dornan, a plasterer from Raploch, pleaded guilty to being concerned in the supply of herbal cannabis.
Defence agent Frazer McCready said his client, a father-of-one, had no criminal record.
Mr McCready said: "He was having financial difficulties, and was clearly beyond his means.
"Unfortunately rather than go to some sort of debt counselling, as he is now doing, he foolishly decided to embark on this exercise with regard to his debts by involving himself in the supply of cannabis.
"Clearly that type of drug was going to be intercepted, and it was.
"There were consequences immediately."
Sheriff Wyllie Robertson told Dornan that despite the fact he had no offending history, he had "no alternative" but to impose the jail sentence, because of the value of the drug involved.
A man who ordered cannabis on the "dark web" and planned to deal the drug to clear his debts has been jailed for six months.