The scoreline at half time was amazingly 0-0 but in the second half the game really came to life.
£400,000 Peruvian striker Mostto who has so far failed to fit in, in the first team got the ball rolling on 51 minutes.
Most recent recruit Jamal Campbell-Ryce played a lovely one-two with Dwayne Mattis before crossing for Mostto to head home.
Bradford fought back though in the 64 minutes.
Kyle Letheren totally misjudged Luke Morgan's cross allowing Medley a simple chance at the back post.
And four minutes later Bradford, having been dominated for large periods went into a shock lead.
Medley this time delivering a ball from the byeline which Leon Osborne turned in at the second attempt.
Barnsley were level within 5 minutes as Rhys Meynell slipped past Bradford keeper Convey and with 5 minutes remaining Barnsley forged ahead again.
A great cross from Luke Potter was headed home by Ricketts and Mattis put the icing on the cake at the death as he nodded home Meynell's cross.
BARNSLEY: Letheren, Meynell, Potter, Reid, Atkinson, Mattis, Togwell (Heslop 75), Butterfield, Mostto, Campbell-Ryce, Ricketts.
Subs: Jennings, Fedorenko, Smith, Free.
BRADFORD CITY: Convey, Griffiths (Sheridan 45), Bartle, Bowes, Smith, Morgan, Horne, Medley, Penford (Carson 83), Osborne.
Subs: Bleau, Dean, O'Hara.