Scotland's public spending watchdog found the money was paid without being cleared by the government.