A Dunedin student who tried to import more than $30,000 of ecstasy to his scarfie flat said he did it to make "easy money".
But 21-year-old Mathew Haven Clarke soon found the international drug game was not as simple as he thought.
• Warning over mega-dose Ecstasy pills flooding into New Zealand
• Aussie GP: 'MDMA is not that dangerous'
• Haunting texts reveal how young woman was scared to take MDMA which killed her at a Sydney music festival
• Snapchat 'where most people' in their 20s buy drugs in NZ
The defendant was arrested in August after eight months of offending, which his counsel Andrew Dawson said was exceptionally straightforward to commit.
"For someone who knows what they're doing with a computer, a few clicks and there [the drugs] are," he said.
It was an increasingly widespread problem, Dawson told the court.
Clarke accessed a website on which users could browse anonymously and securely.
The student used bitcoins to buy MDMA and provided the address of his flat — he only attempted to cover his tracks by providing a fake name.
Then he waited.
It was "relatively unsophisticated", Judge John Macdonald said.
During the eight-month period, Customs intercepted eight packages — containing a total of 115.5g of the class B substance — destined for Clarke's Dunedin home.
However, several consignments slipped through the net.
Clarke received 40g of MDMA, which he sold at $160 to $200 a gram.
On August 19, police raided the man's home where they seized $1620.
The cash, Clarke admitted, was from his ecstasy sales.
"The defendant admitted the facts... and said he imported the drugs to make easy money," a police summary said.
If all 155.5g had made it to Clarke, he could have made up to $31,100, police said.
Dawson said the illicit enterprise had been the result of his client's association with "a particular group of people".
However, Clarke wanted to take full responsibility for his actions, he said.
The importations happened at a time when the defendant was feeling self-destructive.
"At that point he didn't care about the consequences," Mr Dawson said.
His attitude had since improved and the lawyer provided documentation showing Clarke had undertaken a drug test and was now free of substances.
Judge Macdonald said the fact the man was consuming as well as selling the drugs likely had some bearing on his decision-making at the time.
A report noted Clarke was a heavy user of drugs and alcohol while studying but was now considered a low risk of reoffending.
He was sentenced to eight months' home detention and 250 hours' community work.
Dawson said Clarke would serve his sentence at the family home in Te Anau.