What do you mean by "I contested it"? Did you plead not guilty? If so, you should have been summoned to a court hearing.
If you pleaded guilty, then there's not much to contest. You'd have had an income-related fine, a surcharge, and costs. £400 seems on the light side: if you phone the court they should explain how it was made up.
BTW the £100 refund would have come from the police ticket office. Nothing to do with the court.