Police also found a Rolex watch and £20,000 in cash when they searched Joe Dempsey's home in Beeston, Leeds, in March this year.
-> Man arrested after tens of thousands of pounds of Flannels stock stolen in Leeds raidDempsey was locked up for ten years in April after pleading guilty to possession of a Class A drug with intent to supply.
The 28-year-old was returned to Leeds Crown Court to face a hearing under the Proceeds of Crime Act.
The court heard Dempsey had benefited by £365,733 as a result of his criminal conduct and has assets available worth £47,183.
Dempsey was ordered to pay the lower sum within three months or face a further nine months in prison.
At his sentencing hearing earlier this year, the court heard officers discovered evidence that he had been leading a lavish lifestyle
Dempsey was arrested when officers were called to a report of a domestic incident at his home on Town Street.
-> Teen who starved dog to death and dumped body in Leeds cemetery is jailedPolice found three phones in the bedroom which were constantly ringing and receiving text messages.
Bashir Ahmed, prosecuting, said police found a machete and a tin containing £20,000 in cash.
Three bags were found containing large amounts of cocaine.
A total of 500 small bags were also found which contained the Class A drug.
Mr Ahmed said 7.5kgs of the drug was found in total, with a street value of £313,000. A Rolex watch was also found at the house along with a receipt for another watch worth £13,000.
A pair of trainers worth £400 were also found in the house.
The phone messages were examined and evidence was found that Dempsey had been involved in street dealing and wholesale supply.
Ian Cook, mitigating, said Dempsey had played a significant role in the drug supply operation but was not at the head of the operation.
Jailing Dempsey, judge Tom Bayliss, QC, said: “This was an enormous amount of Class A drugs."