Wes Welker left the Kentucky Derby with nearby $15,000 more than he should have ... thanks to a machine malfunction ... and now Churchill Downs is demanding he give the money back, stat ... TMZ Sports has learned.
Here's what we know ... Wes personally placed a number of bets on the Derby on May 3rd -- AND HIT BIG. Sources tell us Welker sent a friend to collect his winnings -- and that person was paid out $57,193.90 at the cashier's window.

Wes was so pumped, he started handing out $100 bills to random strangers.

But we've learned ... officials at the track believe there was an error at the window DURING the moments Welker's ticket was being paid out ... (we're told it was computer malfunction compounded by human error) ... and the result was Wes being overpaid to the tune of $14,858.55.

A rep for Churchill Downs confirms ... "There was a $14 thousand dollar overpayment due to a tote machine malfunction."