The Stags are entitled to a fee because Coke is and under 24.
But it has been decided by a tribunal that £15,000 will be paid immediately, with another £15,000 payable in October and a further £7,500 in January 2008.
Another £40,000 will be paid dependant on appearances with £10,000 payable after 10, 20, 30 and 40 games and there is also a 20% sell on clause.
Coke joined the Cobblers on a two-year deal in July after rejecting a new contract with Mansfield.
He started his career as a trainee at QPR, had a spell at Kingstonian and then joined Mansfield in March 2005.
BBC